From 475cade27fb9a145161873ae9dc1df480b1ab166 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 6 Sep 2019 13:15:48 +0200 Subject: [PATCH 01/42] support adding files from IPFS url --- client/package-lock.json | 32 +++++++++++++++++--- client/package.json | 2 +- client/src/components/atoms/Form/Input.tsx | 1 + client/src/routes/Publish/Files/ItemForm.tsx | 4 +-- server/.env.example | 1 + server/README.md | 18 +++++++---- server/src/config/config.ts | 8 +++-- server/src/routes/ReportRouter.ts | 4 +-- server/src/routes/UrlCheckRouter.ts | 14 +++++++-- 9 files changed, 64 insertions(+), 20 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 76fb1f9..c0bc051 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -9125,10 +9125,13 @@ "unc-path-regex": "^0.1.2" } }, - "is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==" + "is-url-superb": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-url-superb/-/is-url-superb-3.0.0.tgz", + "integrity": "sha512-3faQP+wHCGDQT1qReM5zCPx2mxoal6DzbzquFlCYJLWyy4WPTved33ea2xFbX37z4NoriEwZGIYhFtx8RUB5wQ==", + "requires": { + "url-regex": "^5.0.0" + } }, "is-utf8": { "version": "0.2.1", @@ -16371,6 +16374,11 @@ "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==" }, + "tlds": { + "version": "1.203.1", + "resolved": "https://registry.npmjs.org/tlds/-/tlds-1.203.1.tgz", + "integrity": "sha512-7MUlYyGJ6rSitEZ3r1Q1QNV8uSIzapS8SmmhSusBuIc7uIxPPwsKllEP0GRp1NS6Ik6F+fRZvnjDWm3ecv2hDw==" + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -17010,6 +17018,22 @@ "prepend-http": "^1.0.1" } }, + "url-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/url-regex/-/url-regex-5.0.0.tgz", + "integrity": "sha512-O08GjTiAFNsSlrUWfqF1jH0H1W3m35ZyadHrGv5krdnmPPoxP27oDTqux/579PtaroiSGm5yma6KT1mHFH6Y/g==", + "requires": { + "ip-regex": "^4.1.0", + "tlds": "^1.203.0" + }, + "dependencies": { + "ip-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.1.0.tgz", + "integrity": "sha512-pKnZpbgCTfH/1NLIlOduP/V+WRXzC2MOz3Qo8xmxk8C5GudJLgK5QyLVXOSWy3ParAH7Eemurl3xjv/WXYFvMA==" + } + } + }, "url-set-query": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", diff --git a/client/package.json b/client/package.json index dff3e63..3b56ff2 100644 --- a/client/package.json +++ b/client/package.json @@ -23,7 +23,7 @@ "ethereum-blockies": "github:MyEtherWallet/blockies", "filesize": "^4.1.2", "history": "^4.9.0", - "is-url": "^1.2.4", + "is-url-superb": "^3.0.0", "moment": "^2.24.0", "query-string": "^6.8.2", "react": "16.8.6", diff --git a/client/src/components/atoms/Form/Input.tsx b/client/src/components/atoms/Form/Input.tsx index a9dd129..4992101 100644 --- a/client/src/components/atoms/Form/Input.tsx +++ b/client/src/components/atoms/Form/Input.tsx @@ -30,6 +30,7 @@ interface InputProps { rows?: number group?: any multiple?: boolean + pattern?: string } interface InputState { diff --git a/client/src/routes/Publish/Files/ItemForm.tsx b/client/src/routes/Publish/Files/ItemForm.tsx index b4e8b0f..fbf8677 100644 --- a/client/src/routes/Publish/Files/ItemForm.tsx +++ b/client/src/routes/Publish/Files/ItemForm.tsx @@ -1,5 +1,5 @@ import React, { PureComponent } from 'react' -import isUrl from 'is-url' +import isUrl from 'is-url-superb' import Input from '../../../components/atoms/Form/Input' import Button from '../../../components/atoms/Button' import styles from './ItemForm.module.scss' @@ -37,7 +37,7 @@ export default class ItemForm extends PureComponent< return } - if (url && !isUrl(url)) { + if (url && !url.includes('ipfs://') && !isUrl(url)) { this.setState({ noUrl: true }) return } diff --git a/server/.env.example b/server/.env.example index 28c38a0..53927a2 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1 +1,2 @@ SENDGRID_API_KEY='xxx' +IPFS_GATEWAY_URL='https://gateway.ipfs.io' diff --git a/server/README.md b/server/README.md index 521b971..7172b1d 100644 --- a/server/README.md +++ b/server/README.md @@ -4,12 +4,12 @@ This folder contains server component written in TypeScript using [Express](https://expressjs.com). The server provides various microservices. -- [Get Started](#Get-Started) -- [✨ API Documentation](#-API-Documentation) - - [Url Checker](#Url-Checker) - - [Report](#Report) -- [🎁 Contributing](#-Contributing) -- [🏛 License](#-License) +- [Get Started](#get-started) +- [✨ API Documentation](#-api-documentation) + - [Url Checker](#url-checker) + - [Report](#report) +- [🎁 Contributing](#-contributing) +- [🏛 License](#-license) ## Get Started @@ -36,6 +36,12 @@ Url Checker returns size and additional information about requested file. This s } ``` +```json +{ + "url": "ipfs://QmQfpdcMWnLTXKKW9GPV7NgtEugghgD6HgzSF6gSrp2mL9" +} +``` + **Response: Success** ```json diff --git a/server/src/config/config.ts b/server/src/config/config.ts index ef9bbe0..9f44d55 100644 --- a/server/src/config/config.ts +++ b/server/src/config/config.ts @@ -1,7 +1,9 @@ +import 'dotenv/config' + const config = { - app: { - port: 4000 - } + app: { port: 4000 }, + sendgridApiKey: process.env.SENDGRID_API_KEY, + ipfsGatewayUrl: process.env.IPFS_GATEWAY_URL || 'https://gateway.ipfs.io' } export default config diff --git a/server/src/routes/ReportRouter.ts b/server/src/routes/ReportRouter.ts index 9751da2..3bdd1bb 100644 --- a/server/src/routes/ReportRouter.ts +++ b/server/src/routes/ReportRouter.ts @@ -1,8 +1,8 @@ import { Router, Request, Response } from 'express' import SendgridMail from '@sendgrid/mail' -import 'dotenv/config' +import config from '../config/config' -SendgridMail.setApiKey(process.env.SENDGRID_API_KEY) +SendgridMail.setApiKey(config.sendgridApiKey) export class ReportRouter { public router: Router diff --git a/server/src/routes/UrlCheckRouter.ts b/server/src/routes/UrlCheckRouter.ts index dbe6eff..00e1a12 100644 --- a/server/src/routes/UrlCheckRouter.ts +++ b/server/src/routes/UrlCheckRouter.ts @@ -1,5 +1,6 @@ import { Router, Request, Response } from 'express' import request from 'request' +import config from '../config/config' export class UrlCheckRouter { public router: Router @@ -12,13 +13,22 @@ export class UrlCheckRouter { } public checkUrl(req: Request, res: Response) { - if (!req.body.url) { + let { url } = req.body + + if (!url) { return res.send({ status: 'error', message: 'missing url' }) } + + // map native IPFS URLs to gateway URLs + if (url.includes('ipfs://')) { + const cid = url.split('ipfs://')[1] + url = `${config.ipfsGatewayUrl}/ipfs/${cid}` + } + request( { method: 'HEAD', - url: req.body.url, + url, headers: { Range: 'bytes=0-' } }, (error, response) => { From 85ffae37d19c67ac979f96d9c73a40378d26882f Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 6 Sep 2019 13:37:56 +0200 Subject: [PATCH 02/42] add help text --- client/src/routes/Publish/Files/ItemForm.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/routes/Publish/Files/ItemForm.tsx b/client/src/routes/Publish/Files/ItemForm.tsx index fbf8677..d8c965f 100644 --- a/client/src/routes/Publish/Files/ItemForm.tsx +++ b/client/src/routes/Publish/Files/ItemForm.tsx @@ -68,6 +68,7 @@ export default class ItemForm extends PureComponent< placeholder={this.props.placeholder} value={url} onChange={this.onChangeUrl} + help="Supported protocols are http(s):// and ipfs://" /> diff --git a/client/src/components/molecules/AccountStatus/Indicator.module.scss b/client/src/components/molecules/AccountStatus/Indicator.module.scss index 09a2b63..caad5d0 100644 --- a/client/src/components/molecules/AccountStatus/Indicator.module.scss +++ b/client/src/components/molecules/AccountStatus/Indicator.module.scss @@ -7,7 +7,7 @@ padding: .5rem; } -// default: red square +/* default: red square */ .statusIndicator { width: $font-size-small; height: $font-size-small; @@ -15,7 +15,7 @@ background: $red; } -// yellow triangle +/* yellow triangle */ .statusIndicatorCloseEnough { composes: statusIndicator; background: none; @@ -26,7 +26,7 @@ border-bottom: $font-size-small solid $yellow; } -// green circle +/* green circle */ .statusIndicatorActive { composes: statusIndicator; border-radius: 50%; diff --git a/client/src/hooks/use-ipfs.tsx b/client/src/hooks/use-ipfs.tsx new file mode 100644 index 0000000..8477b4f --- /dev/null +++ b/client/src/hooks/use-ipfs.tsx @@ -0,0 +1,54 @@ +/* eslint-disable no-console */ + +import Ipfs from 'ipfs' +import { useEffect, useState } from 'react' + +let ipfs: any = null +let ipfsMessage: string | null = null + +export default function useIpfs() { + const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) + const [ipfsInitError, setIpfsInitError] = useState(null) + + async function startIpfs() { + if (ipfs) { + console.log('IPFS already started') + // } else if (window.ipfs && window.ipfs.enable) { + // console.log('Found window.ipfs') + // ipfs = await window.ipfs.enable() + } else { + try { + const message = 'IPFS Started' + console.time(message) + ipfs = await Ipfs.create() + console.timeEnd(message) + ipfsMessage = message + } catch (error) { + const message = `IPFS init error: ${error.message}` + ipfsMessage = message + console.error(message) + ipfs = null + setIpfsInitError(error) + } + } + setIpfsReady(Boolean(ipfs)) + } + + useEffect(() => { + startIpfs() + + // just like componentDidUnmount() + return function cleanup() { + if (ipfs && ipfs.stop) { + console.time('IPFS Stopped') + ipfs.stop() + setIpfsReady(false) + ipfs = null + ipfsMessage = null + console.timeEnd('IPFS Stopped') + } + } + }, []) + + return { ipfs, isIpfsReady, ipfsInitError, ipfsMessage } +} diff --git a/client/src/routes/Publish/Files/Ipfs.module.scss b/client/src/routes/Publish/Files/Ipfs.module.scss new file mode 100644 index 0000000..5179404 --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs.module.scss @@ -0,0 +1,5 @@ +@import '../../../styles/variables'; + +.ipfsForm { + margin-top: $spacer; +} diff --git a/client/src/routes/Publish/Files/Ipfs.tsx b/client/src/routes/Publish/Files/Ipfs.tsx new file mode 100644 index 0000000..55d02dc --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs.tsx @@ -0,0 +1,61 @@ +/* eslint-disable no-console */ + +import React from 'react' +import axios from 'axios' +import useIpfs from '../../../hooks/use-ipfs' +import styles from './Ipfs.module.scss' + +async function pingUrl(url: string) { + try { + const response = await axios(url) + if (response.status !== 200) console.error(`Could not find ${url}`) + + console.log(`File found under ${url}`) + return + } catch (error) { + console.error(error.message) + } +} + +export default function Ipfs({ addItem }: { addItem(url: string): void }) { + const { ipfs, ipfsInitError, ipfsMessage } = useIpfs() + + async function saveToIpfs(buffer: Buffer) { + try { + const response = await ipfs.add(buffer) + const cid = response[0].hash + console.log(`File added: ${cid}`) + + // ping url to make it globally available + const url = `https://ipfs.io/ipfs/${cid}` + await pingUrl(url) + + // add IPFS url to file.url + addItem(url) + } catch (error) { + console.error(error.message) + } + } + + function handleCaptureFile(files: FileList | null) { + const reader: any = new window.FileReader() + const file = files && files[0] + + reader.readAsArrayBuffer(file) + reader.onloadend = () => { + const buffer: any = Buffer.from(reader.result) + saveToIpfs(buffer) + } + } + + return ( +
+ handleCaptureFile(e.target.files)} + /> + {ipfsMessage &&
{ipfsMessage}
} + {ipfsInitError &&
{ipfsInitError}
} +
+ ) +} diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index 96eee37..b93f225 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { render, fireEvent, waitForElement } from '@testing-library/react' +import { render, fireEvent, waitForElement, act } from '@testing-library/react' import mockAxios from 'jest-mock-axios' import Files from '.' @@ -56,16 +56,32 @@ describe('Files', () => { const { container, getByText } = renderComponent() // open - fireEvent.click(getByText('+ Add a file')) + fireEvent.click(getByText('+ Add a file URL')) await waitForElement(() => getByText('- Cancel')) expect(container.querySelector('.itemForm')).toBeInTheDocument() // close fireEvent.click(getByText('- Cancel')) - await waitForElement(() => getByText('+ Add a file')) + await waitForElement(() => getByText('+ Add a file URL')) expect(container.querySelector('.grow-exit')).toBeInTheDocument() }) + it('new IPFS file form can be opened and closed', async () => { + const { container, getByText } = renderComponent() + + // open + act(async () => { + fireEvent.click(getByText('+ Add to IPFS')) + await waitForElement(() => getByText('- Cancel')) + expect(container.querySelector('.ipfsForm')).toBeInTheDocument() + + // close + fireEvent.click(getByText('- Cancel')) + await waitForElement(() => getByText('+ Add to IPFS')) + expect(container.querySelector('.grow-exit')).toBeInTheDocument() + }) + }) + it('item can be removed', async () => { const { getByTitle } = renderComponent() @@ -76,7 +92,7 @@ describe('Files', () => { it('item can be added', async () => { const { getByText, getByPlaceholderText } = renderComponent() - fireEvent.click(getByText('+ Add a file')) + fireEvent.click(getByText('+ Add a file URL')) await waitForElement(() => getByText('- Cancel')) fireEvent.change(getByPlaceholderText('Hello'), { target: { value: 'https://hello.com' } diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index 2ee5e86..d2e603e 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -1,15 +1,16 @@ import React, { FormEvent, PureComponent, ChangeEvent } from 'react' import { CSSTransition, TransitionGroup } from 'react-transition-group' import axios from 'axios' +import { Logger } from '@oceanprotocol/squid' import Button from '../../../components/atoms/Button' import Help from '../../../components/atoms/Form/Help' import ItemForm from './ItemForm' import Item from './Item' +import Ipfs from './Ipfs' import styles from './index.module.scss' import { serviceUri } from '../../../config' import cleanupContentType from '../../../utils/cleanupContentType' -import { Logger } from '@oceanprotocol/squid' export interface File { url: string @@ -39,11 +40,13 @@ interface FilesProps { interface FilesStates { isFormShown: boolean + isIpfsFormShown: boolean } export default class Files extends PureComponent { public state: FilesStates = { - isFormShown: false + isFormShown: false, + isIpfsFormShown: false } // for canceling axios requests @@ -55,13 +58,17 @@ export default class Files extends PureComponent { private toggleForm = (e: Event) => { e.preventDefault() - this.setState({ isFormShown: !this.state.isFormShown }) } - private addItem = async (value: string) => { + private toggleIpfsForm = (e: Event) => { + e.preventDefault() + this.setState({ isIpfsFormShown: !this.state.isIpfsFormShown }) + } + + private addItem = async (url: string) => { const file: File = { - url: value, + url, contentType: '', found: false // non-standard } @@ -71,14 +78,14 @@ export default class Files extends PureComponent { method: 'POST', headers: { 'Content-Type': 'application/json' }, url: `${serviceUri}/api/v1/urlcheck`, - data: { url: value }, + data: { url }, cancelToken: this.signal.token }) const { contentLength, contentType, found } = response.data.result file.contentLength = contentLength file.contentType = contentType - file.compression = await cleanupContentType(contentType) + file.compression = cleanupContentType(contentType) file.found = found } catch (error) { !axios.isCancel(error) && Logger.error(error.message) @@ -92,7 +99,10 @@ export default class Files extends PureComponent { } } this.props.onChange(event as any) - this.setState({ isFormShown: !this.state.isFormShown }) + this.setState({ + isFormShown: !this.state.isFormShown, + isIpfsFormShown: !this.state.isIpfsFormShown + }) } private removeItem = (index: number) => { @@ -108,8 +118,8 @@ export default class Files extends PureComponent { } public render() { - const { isFormShown } = this.state const { files, help, placeholder, name, onChange } = this.props + const { isFormShown, isIpfsFormShown } = this.state return ( <> @@ -148,7 +158,11 @@ export default class Files extends PureComponent { )} + + { addItem={this.addItem} /> + + this.setState({ isIpfsFormShown: false })} + > + + ) diff --git a/package-lock.json b/package-lock.json index da2fc6b..7afa7c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -559,15 +559,15 @@ } }, "acorn": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", - "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", + "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", "dev": true }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", + "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", "dev": true }, "ajv": { @@ -2118,9 +2118,9 @@ "dev": true }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "strip-ansi": { From 3b889725f14565ec466ef5c35d37c90991793877 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 4 Sep 2019 20:25:37 +0200 Subject: [PATCH 05/42] more user feedback, refactoring --- client/src/hooks/use-ipfs.tsx | 13 +-- .../src/routes/Publish/Files/Ipfs.module.scss | 49 +++++++++- client/src/routes/Publish/Files/Ipfs.tsx | 67 +++++++++++--- .../routes/Publish/Files/ItemForm.module.scss | 5 +- .../routes/Publish/Files/ItemForm.test.tsx | 10 +-- client/src/routes/Publish/Files/ItemForm.tsx | 4 +- .../routes/Publish/Files/index.module.scss | 4 + .../src/routes/Publish/Files/index.test.tsx | 26 +++--- client/src/routes/Publish/Files/index.tsx | 89 ++++++++++--------- 9 files changed, 182 insertions(+), 85 deletions(-) diff --git a/client/src/hooks/use-ipfs.tsx b/client/src/hooks/use-ipfs.tsx index 8477b4f..b24a26f 100644 --- a/client/src/hooks/use-ipfs.tsx +++ b/client/src/hooks/use-ipfs.tsx @@ -4,13 +4,15 @@ import Ipfs from 'ipfs' import { useEffect, useState } from 'react' let ipfs: any = null -let ipfsMessage: string | null = null +let ipfsMessage = '' export default function useIpfs() { const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) const [ipfsInitError, setIpfsInitError] = useState(null) async function startIpfs() { + ipfsMessage = 'Starting IPFS...' + if (ipfs) { console.log('IPFS already started') // } else if (window.ipfs && window.ipfs.enable) { @@ -18,7 +20,7 @@ export default function useIpfs() { // ipfs = await window.ipfs.enable() } else { try { - const message = 'IPFS Started' + const message = 'IPFS started' console.time(message) ipfs = await Ipfs.create() console.timeEnd(message) @@ -40,12 +42,13 @@ export default function useIpfs() { // just like componentDidUnmount() return function cleanup() { if (ipfs && ipfs.stop) { - console.time('IPFS Stopped') + console.time('IPFS stopped') ipfs.stop() setIpfsReady(false) ipfs = null - ipfsMessage = null - console.timeEnd('IPFS Stopped') + ipfsMessage = '' + setIpfsInitError(null) + console.timeEnd('IPFS stopped') } } }, []) diff --git a/client/src/routes/Publish/Files/Ipfs.module.scss b/client/src/routes/Publish/Files/Ipfs.module.scss index 5179404..2de801c 100644 --- a/client/src/routes/Publish/Files/Ipfs.module.scss +++ b/client/src/routes/Publish/Files/Ipfs.module.scss @@ -1,5 +1,52 @@ @import '../../../styles/variables'; .ipfsForm { - margin-top: $spacer; + margin-top: $spacer / 2; + border: 1px solid $brand-grey-lighter; + border-radius: $border-radius; + padding: $spacer / 2; + background: $body-background; + + input { + display: block; + width: fit-content; + cursor: pointer; + border: .1rem solid $brand-grey-lighter; + border-radius: $border-radius; + padding: $spacer / 2 $spacer / 2; + margin-top: $spacer / 2; + background: $brand-white; + transition: border .2s ease-out; + + &:hover { + border-color: $brand-grey-light; + } + } +} + +.message { + font-size: $font-size-small; + margin-top: $spacer / 2; + color: $brand-grey-light; + + &:before { + content: ''; + width: .5rem; + height: .5rem; + display: inline-block; + background: $green; + border-radius: 50%; + margin-right: $spacer / 4; + margin-bottom: .05rem; + } +} + +.error { + composes: message; + color: $red; + + &:before { + border-radius: 0; + background: $red; + } } diff --git a/client/src/routes/Publish/Files/Ipfs.tsx b/client/src/routes/Publish/Files/Ipfs.tsx index 55d02dc..7c59f44 100644 --- a/client/src/routes/Publish/Files/Ipfs.tsx +++ b/client/src/routes/Publish/Files/Ipfs.tsx @@ -1,39 +1,66 @@ /* eslint-disable no-console */ -import React from 'react' +import React, { useState } from 'react' import axios from 'axios' import useIpfs from '../../../hooks/use-ipfs' +import Label from '../../../components/atoms/Form/Label' +import Spinner from '../../../components/atoms/Spinner' import styles from './Ipfs.module.scss' async function pingUrl(url: string) { try { const response = await axios(url) - if (response.status !== 200) console.error(`Could not find ${url}`) + if (response.status !== 200) console.error(`Not found: ${url}`) - console.log(`File found under ${url}`) + console.log(`File found: ${url}`) return } catch (error) { console.error(error.message) } } -export default function Ipfs({ addItem }: { addItem(url: string): void }) { - const { ipfs, ipfsInitError, ipfsMessage } = useIpfs() +function formatBytes(a: number, b: number) { + if (a === 0) return '0 Bytes' + const c = 1024 + const d = b || 2 + const e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] + const f = Math.floor(Math.log(a) / Math.log(c)) + + return parseFloat((a / Math.pow(c, f)).toFixed(d)) + ' ' + e[f] +} + +export default function Ipfs({ addFile }: { addFile(url: string): void }) { + const { ipfs, isIpfsReady, ipfsInitError, ipfsMessage } = useIpfs() + const [loading, setLoading] = useState(false) + const [message, setMessage] = useState('') async function saveToIpfs(buffer: Buffer) { + setLoading(true) + setMessage('Adding to local IPFS node
') + try { - const response = await ipfs.add(buffer) + const response = await ipfs.add(buffer, { + progress: (length: number) => { + setMessage( + `Adding to local IPFS node
+ ${formatBytes(length, 0)}` + ) + } + }) + const cid = response[0].hash console.log(`File added: ${cid}`) // ping url to make it globally available const url = `https://ipfs.io/ipfs/${cid}` + setMessage('Checking global IPFS URL') await pingUrl(url) // add IPFS url to file.url - addItem(url) + addFile(url) } catch (error) { console.error(error.message) + setLoading(false) } } @@ -50,12 +77,26 @@ export default function Ipfs({ addItem }: { addItem(url: string): void }) { return (
- handleCaptureFile(e.target.files)} - /> - {ipfsMessage &&
{ipfsMessage}
} - {ipfsInitError &&
{ipfsInitError}
} + + {loading ? ( + + ) : ( + handleCaptureFile(e.target.files)} + disabled={!isIpfsReady} + /> + )} + {ipfsMessage !== '' && ( +
{ipfsMessage}
+ )} + {ipfsInitError && ( +
{ipfsInitError}
+ )}
) } diff --git a/client/src/routes/Publish/Files/ItemForm.module.scss b/client/src/routes/Publish/Files/ItemForm.module.scss index 2c30153..de1a497 100644 --- a/client/src/routes/Publish/Files/ItemForm.module.scss +++ b/client/src/routes/Publish/Files/ItemForm.module.scss @@ -2,7 +2,10 @@ .itemForm { margin-top: $spacer / 2; - padding-left: $spacer / 2; + border: 1px solid $brand-grey-lighter; + border-radius: $border-radius; + padding: $spacer / 2; + background: $body-background; button { margin-top: -($spacer * 2); diff --git a/client/src/routes/Publish/Files/ItemForm.test.tsx b/client/src/routes/Publish/Files/ItemForm.test.tsx index 3fbd8d0..0fc7ddb 100644 --- a/client/src/routes/Publish/Files/ItemForm.test.tsx +++ b/client/src/routes/Publish/Files/ItemForm.test.tsx @@ -2,10 +2,10 @@ import React from 'react' import { render, fireEvent } from '@testing-library/react' import ItemForm from './ItemForm' -const addItem = jest.fn() +const addFile = jest.fn() const setup = () => { - const utils = render() + const utils = render() const input = utils.getByPlaceholderText('Hello') const button = utils.getByText('Add File') const { container } = utils @@ -23,17 +23,17 @@ describe('ItemForm', () => { expect(container.firstChild).toBeInTheDocument() }) - it('fires addItem', async () => { + it('fires addFile', async () => { const { input, button } = setup() fireEvent.change(input, { target: { value: 'https://hello.com' } }) fireEvent.click(button) - expect(addItem).toHaveBeenCalled() + expect(addFile).toHaveBeenCalled() }) - it('does not fire addItem when no url present', () => { + it('does not fire addFile when no url present', () => { const { input, button, container } = setup() // empty url diff --git a/client/src/routes/Publish/Files/ItemForm.tsx b/client/src/routes/Publish/Files/ItemForm.tsx index d8c965f..b6a144e 100644 --- a/client/src/routes/Publish/Files/ItemForm.tsx +++ b/client/src/routes/Publish/Files/ItemForm.tsx @@ -5,7 +5,7 @@ import Button from '../../../components/atoms/Button' import styles from './ItemForm.module.scss' interface ItemFormProps { - addItem(url: string): void + addFile(url: string): void placeholder: string } @@ -42,7 +42,7 @@ export default class ItemForm extends PureComponent< return } - this.props.addItem(url) + this.props.addFile(url) } private onChangeUrl = (e: React.FormEvent) => { diff --git a/client/src/routes/Publish/Files/index.module.scss b/client/src/routes/Publish/Files/index.module.scss index 26dd2aa..c725590 100644 --- a/client/src/routes/Publish/Files/index.module.scss +++ b/client/src/routes/Publish/Files/index.module.scss @@ -2,6 +2,10 @@ .newItems { margin-top: $spacer / 2; + + > button { + margin-right: $spacer; + } } .itemsList { diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index b93f225..fb9e0f7 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { render, fireEvent, waitForElement, act } from '@testing-library/react' +import { render, fireEvent, waitForElement } from '@testing-library/react' import mockAxios from 'jest-mock-axios' import Files from '.' @@ -56,30 +56,28 @@ describe('Files', () => { const { container, getByText } = renderComponent() // open - fireEvent.click(getByText('+ Add a file URL')) + fireEvent.click(getByText('+ From public URL')) await waitForElement(() => getByText('- Cancel')) expect(container.querySelector('.itemForm')).toBeInTheDocument() // close fireEvent.click(getByText('- Cancel')) - await waitForElement(() => getByText('+ Add a file URL')) - expect(container.querySelector('.grow-exit')).toBeInTheDocument() + await waitForElement(() => getByText('+ From public URL')) + expect(container.querySelector('.itemForm')).not.toBeInTheDocument() }) it('new IPFS file form can be opened and closed', async () => { const { container, getByText } = renderComponent() // open - act(async () => { - fireEvent.click(getByText('+ Add to IPFS')) - await waitForElement(() => getByText('- Cancel')) - expect(container.querySelector('.ipfsForm')).toBeInTheDocument() + fireEvent.click(getByText('+ Add to IPFS')) + await waitForElement(() => getByText('- Cancel')) + expect(container.querySelector('.ipfsForm')).toBeInTheDocument() - // close - fireEvent.click(getByText('- Cancel')) - await waitForElement(() => getByText('+ Add to IPFS')) - expect(container.querySelector('.grow-exit')).toBeInTheDocument() - }) + // close + fireEvent.click(getByText('- Cancel')) + await waitForElement(() => getByText('+ Add to IPFS')) + expect(container.querySelector('.ipfsForm')).not.toBeInTheDocument() }) it('item can be removed', async () => { @@ -92,7 +90,7 @@ describe('Files', () => { it('item can be added', async () => { const { getByText, getByPlaceholderText } = renderComponent() - fireEvent.click(getByText('+ Add a file URL')) + fireEvent.click(getByText('+ From public URL')) await waitForElement(() => getByText('- Cancel')) fireEvent.change(getByPlaceholderText('Hello'), { target: { value: 'https://hello.com' } diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index d2e603e..c023ef9 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -1,5 +1,4 @@ import React, { FormEvent, PureComponent, ChangeEvent } from 'react' -import { CSSTransition, TransitionGroup } from 'react-transition-group' import axios from 'axios' import { Logger } from '@oceanprotocol/squid' import Button from '../../../components/atoms/Button' @@ -58,15 +57,21 @@ export default class Files extends PureComponent { private toggleForm = (e: Event) => { e.preventDefault() - this.setState({ isFormShown: !this.state.isFormShown }) + this.setState({ + isFormShown: !this.state.isFormShown, + isIpfsFormShown: false + }) } private toggleIpfsForm = (e: Event) => { e.preventDefault() - this.setState({ isIpfsFormShown: !this.state.isIpfsFormShown }) + this.setState({ + isIpfsFormShown: !this.state.isIpfsFormShown, + isFormShown: false + }) } - private addItem = async (url: string) => { + private async getFile(url: string) { const file: File = { url, contentType: '', @@ -83,15 +88,34 @@ export default class Files extends PureComponent { }) const { contentLength, contentType, found } = response.data.result + file.contentLength = contentLength file.contentType = contentType file.compression = cleanupContentType(contentType) file.found = found + + return file } catch (error) { !axios.isCancel(error) && Logger.error(error.message) } + } + + private addFile = async (url: string) => { + // check for duplicate urls + const duplicateFiles = this.props.files.filter(props => + url.includes(props.url) + ) + + if (duplicateFiles.length > 0) { + return this.setState({ + isFormShown: false, + isIpfsFormShown: false + }) + } + + const file: File | undefined = await this.getFile(url) + file && this.props.files.push(file) - this.props.files.push(file) const event = { currentTarget: { name: 'files', @@ -99,13 +123,14 @@ export default class Files extends PureComponent { } } this.props.onChange(event as any) + this.setState({ - isFormShown: !this.state.isFormShown, - isIpfsFormShown: !this.state.isIpfsFormShown + isFormShown: false, + isIpfsFormShown: false }) } - private removeItem = (index: number) => { + private removeFile = (index: number) => { this.props.files.splice(index, 1) const event = { currentTarget: { @@ -136,57 +161,33 @@ export default class Files extends PureComponent {
{files.length > 0 && ( - +
    {files.map((item: any, index: number) => ( - - - this.removeItem(index) - } - /> - + this.removeFile(index)} + /> ))} - +
)} - this.setState({ isFormShown: false })} - > + {isFormShown && ( - + )} - this.setState({ isIpfsFormShown: false })} - > - - + {isIpfsFormShown && }
) From 9c38c824966531dcb80011cf4ab1919250dfd23c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 5 Sep 2019 00:14:38 +0200 Subject: [PATCH 06/42] output js-ipfs version --- client/src/hooks/use-ipfs.tsx | 7 ++++++- client/src/routes/Publish/Files/Ipfs.module.scss | 2 +- client/src/routes/Publish/Files/Ipfs.tsx | 15 +++++++++++++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/client/src/hooks/use-ipfs.tsx b/client/src/hooks/use-ipfs.tsx index b24a26f..6f9ba3f 100644 --- a/client/src/hooks/use-ipfs.tsx +++ b/client/src/hooks/use-ipfs.tsx @@ -5,6 +5,7 @@ import { useEffect, useState } from 'react' let ipfs: any = null let ipfsMessage = '' +let ipfsVersion = '' export default function useIpfs() { const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) @@ -25,6 +26,9 @@ export default function useIpfs() { ipfs = await Ipfs.create() console.timeEnd(message) ipfsMessage = message + + const { version } = await ipfs.version() + ipfsVersion = version } catch (error) { const message = `IPFS init error: ${error.message}` ipfsMessage = message @@ -47,11 +51,12 @@ export default function useIpfs() { setIpfsReady(false) ipfs = null ipfsMessage = '' + ipfsVersion = '' setIpfsInitError(null) console.timeEnd('IPFS stopped') } } }, []) - return { ipfs, isIpfsReady, ipfsInitError, ipfsMessage } + return { ipfs, ipfsVersion, isIpfsReady, ipfsInitError, ipfsMessage } } diff --git a/client/src/routes/Publish/Files/Ipfs.module.scss b/client/src/routes/Publish/Files/Ipfs.module.scss index 2de801c..d71a6b3 100644 --- a/client/src/routes/Publish/Files/Ipfs.module.scss +++ b/client/src/routes/Publish/Files/Ipfs.module.scss @@ -9,7 +9,7 @@ input { display: block; - width: fit-content; + width: 100%; cursor: pointer; border: .1rem solid $brand-grey-lighter; border-radius: $border-radius; diff --git a/client/src/routes/Publish/Files/Ipfs.tsx b/client/src/routes/Publish/Files/Ipfs.tsx index 7c59f44..9f8beb2 100644 --- a/client/src/routes/Publish/Files/Ipfs.tsx +++ b/client/src/routes/Publish/Files/Ipfs.tsx @@ -30,7 +30,13 @@ function formatBytes(a: number, b: number) { } export default function Ipfs({ addFile }: { addFile(url: string): void }) { - const { ipfs, isIpfsReady, ipfsInitError, ipfsMessage } = useIpfs() + const { + ipfs, + ipfsVersion, + isIpfsReady, + ipfsInitError, + ipfsMessage + } = useIpfs() const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') @@ -92,7 +98,12 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { /> )} {ipfsMessage !== '' && ( -
{ipfsMessage}
+
+ {ipfsMessage} +
)} {ipfsInitError && (
{ipfsInitError}
From b6d255bbadcb5537fe4e6092e6e767c17cf1a730 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 5 Sep 2019 11:33:31 +0200 Subject: [PATCH 07/42] IPFS gateway tweaks --- client/src/hooks/use-ipfs.tsx | 7 ++++--- client/src/routes/Publish/Files/Ipfs.tsx | 16 +++++++++------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/client/src/hooks/use-ipfs.tsx b/client/src/hooks/use-ipfs.tsx index 6f9ba3f..f5347e6 100644 --- a/client/src/hooks/use-ipfs.tsx +++ b/client/src/hooks/use-ipfs.tsx @@ -23,12 +23,13 @@ export default function useIpfs() { try { const message = 'IPFS started' console.time(message) + ipfs = await Ipfs.create() console.timeEnd(message) ipfsMessage = message - const { version } = await ipfs.version() - ipfsVersion = version + const { agentVersion } = await ipfs.id() + ipfsVersion = agentVersion } catch (error) { const message = `IPFS init error: ${error.message}` ipfsMessage = message @@ -43,7 +44,7 @@ export default function useIpfs() { useEffect(() => { startIpfs() - // just like componentDidUnmount() + // just like componentWillUnmount() return function cleanup() { if (ipfs && ipfs.stop) { console.time('IPFS stopped') diff --git a/client/src/routes/Publish/Files/Ipfs.tsx b/client/src/routes/Publish/Files/Ipfs.tsx index 9f8beb2..a3a5f8d 100644 --- a/client/src/routes/Publish/Files/Ipfs.tsx +++ b/client/src/routes/Publish/Files/Ipfs.tsx @@ -57,10 +57,15 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { const cid = response[0].hash console.log(`File added: ${cid}`) - // ping url to make it globally available + // Ping gateway url to make it globally available. + // Using gateway.ipfs.io is faster for initial ping, + // but we store ipfs.io url in DDO. + // https://ipfs.github.io/public-gateway-checker/ const url = `https://ipfs.io/ipfs/${cid}` - setMessage('Checking global IPFS URL') - await pingUrl(url) + const urlGateway = `https://gateway.ipfs.io/ipfs/${cid}` + + setMessage('Checking IPFS gateway URL') + await pingUrl(urlGateway) // add IPFS url to file.url addFile(url) @@ -98,10 +103,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { /> )} {ipfsMessage !== '' && ( -
+
{ipfsMessage}
)} From 5002effbfeb4cbe62bef9a393d258b30b5bdfc06 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 5 Sep 2019 12:03:14 +0200 Subject: [PATCH 08/42] unit test fixes --- client/src/hooks/use-ipfs.tsx | 2 +- client/src/routes/Publish/Files/Ipfs.test.tsx | 15 +++++++++++++ .../src/routes/Publish/Files/index.test.tsx | 21 ++++++++++++++++++- client/src/setupTests.js | 19 +++++++++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 client/src/routes/Publish/Files/Ipfs.test.tsx diff --git a/client/src/hooks/use-ipfs.tsx b/client/src/hooks/use-ipfs.tsx index f5347e6..eae0c8f 100644 --- a/client/src/hooks/use-ipfs.tsx +++ b/client/src/hooks/use-ipfs.tsx @@ -35,7 +35,7 @@ export default function useIpfs() { ipfsMessage = message console.error(message) ipfs = null - setIpfsInitError(error) + setIpfsInitError(error.message) } } setIpfsReady(Boolean(ipfs)) diff --git a/client/src/routes/Publish/Files/Ipfs.test.tsx b/client/src/routes/Publish/Files/Ipfs.test.tsx new file mode 100644 index 0000000..db34471 --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs.test.tsx @@ -0,0 +1,15 @@ +import React from 'react' +import { render } from '@testing-library/react' +import Ipfs from './Ipfs' + +const addFile = jest.fn() + +describe('Ipfs', () => { + it('renders without crashing', async () => { + const { container, findByText } = render() + expect(container.firstChild).toBeInTheDocument() + + // wait for IPFS node + await findByText(/IPFS /) + }) +}) diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index fb9e0f7..b1d3096 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -5,6 +5,22 @@ import Files from '.' const onChange = jest.fn() +// filter out IPFS node messages +const originalLog = console.log + +beforeAll(() => { + console.log = (...args: any) => { + if (/Swarm listening/.test(args[0])) { + return + } + originalLog.call(console, ...args) + } +}) + +afterAll(() => { + console.log = originalLog +}) + afterEach(() => { mockAxios.reset() }) @@ -67,13 +83,16 @@ describe('Files', () => { }) it('new IPFS file form can be opened and closed', async () => { - const { container, getByText } = renderComponent() + const { container, getByText, findByText } = renderComponent() // open fireEvent.click(getByText('+ Add to IPFS')) await waitForElement(() => getByText('- Cancel')) expect(container.querySelector('.ipfsForm')).toBeInTheDocument() + // wait for IPFS node + await findByText(/IPFS /) + // close fireEvent.click(getByText('- Cancel')) await waitForElement(() => getByText('+ Add to IPFS')) diff --git a/client/src/setupTests.js b/client/src/setupTests.js index b6c8c4e..aab97f9 100644 --- a/client/src/setupTests.js +++ b/client/src/setupTests.js @@ -1,2 +1,21 @@ +/* eslint-disable no-console */ + import '@testing-library/jest-dom/extend-expect' import '@testing-library/react/cleanup-after-each' + +// this is just a little hack to silence a warning that we'll get until we +// upgrade to 16.9: https://github.com/facebook/react/pull/14853 +const originalError = console.error + +beforeAll(() => { + console.error = (...args) => { + if (/Warning.*not wrapped in act/.test(args[0])) { + return + } + originalError.call(console, ...args) + } +}) + +afterAll(() => { + console.error = originalError +}) From 6db965b79a67fca482d73d0c485d719e77c5e754 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 5 Sep 2019 12:34:11 +0200 Subject: [PATCH 09/42] more test fixes --- client/src/routes/Publish/Files/index.test.tsx | 6 +++--- client/src/routes/Publish/Files/index.tsx | 2 +- cypress/integration/1_publish.spec.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index b1d3096..c490901 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -72,13 +72,13 @@ describe('Files', () => { const { container, getByText } = renderComponent() // open - fireEvent.click(getByText('+ From public URL')) + fireEvent.click(getByText('+ From URL')) await waitForElement(() => getByText('- Cancel')) expect(container.querySelector('.itemForm')).toBeInTheDocument() // close fireEvent.click(getByText('- Cancel')) - await waitForElement(() => getByText('+ From public URL')) + await waitForElement(() => getByText('+ From URL')) expect(container.querySelector('.itemForm')).not.toBeInTheDocument() }) @@ -109,7 +109,7 @@ describe('Files', () => { it('item can be added', async () => { const { getByText, getByPlaceholderText } = renderComponent() - fireEvent.click(getByText('+ From public URL')) + fireEvent.click(getByText('+ From URL')) await waitForElement(() => getByText('- Cancel')) fireEvent.change(getByPlaceholderText('Hello'), { target: { value: 'https://hello.com' } diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index c023ef9..b27d779 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -173,7 +173,7 @@ export default class Files extends PureComponent { )}
)} - {ipfsInitError && ( -
{ipfsInitError}
- )} + {ipfsError &&
{ipfsError}
} ) } From 955608202d7e9a727c731211e2486ecc5cb10d79 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 6 Sep 2019 12:39:48 +0200 Subject: [PATCH 12/42] message output --- client/src/hooks/use-ipfs-api.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index 7982618..965fe4e 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -1,3 +1,5 @@ +/* eslint-disable no-console */ + import { useEffect, useState } from 'react' import ipfsClient from 'ipfs-http-client' @@ -19,10 +21,14 @@ export default function useIpfsApi(config: { if (ipfs) return try { + const message = 'Connected to IPFS gateway' + console.time(message) ipfs = await ipfsClient(config) + console.timeEnd(message) + ipfsMessage = message + const version = await ipfs.version() ipfsVersion = version.version - ipfsMessage = 'Connected to IPFS gateway' } catch (error) { setIpfsError(error.message) } From a258f6b94be90859891528c391679c78a37e599a Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 6 Sep 2019 14:48:49 +0200 Subject: [PATCH 13/42] fix useEffect warning --- client/src/hooks/use-ipfs-api.tsx | 41 +++++++++++++++---------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index 965fe4e..2b2dd16 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -15,27 +15,26 @@ export default function useIpfsApi(config: { const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) const [ipfsError, setIpfsError] = useState(null) - async function initIpfs() { - ipfsMessage = 'Checking IPFS gateway...' - - if (ipfs) return - - try { - const message = 'Connected to IPFS gateway' - console.time(message) - ipfs = await ipfsClient(config) - console.timeEnd(message) - ipfsMessage = message - - const version = await ipfs.version() - ipfsVersion = version.version - } catch (error) { - setIpfsError(error.message) - } - setIpfsReady(Boolean(ipfs)) - } - useEffect(() => { + async function initIpfs() { + ipfsMessage = 'Checking IPFS gateway...' + + if (ipfs) return + + try { + const message = 'Connected to IPFS gateway' + console.time(message) + ipfs = await ipfsClient(config) + console.timeEnd(message) + ipfsMessage = message + + const version = await ipfs.version() + ipfsVersion = version.version + } catch (error) { + setIpfsError(error.message) + } + setIpfsReady(Boolean(ipfs)) + } initIpfs() // just like componentWillUnmount() @@ -48,7 +47,7 @@ export default function useIpfsApi(config: { setIpfsError(null) } } - }, []) + }, [config]) return { ipfs, ipfsVersion, isIpfsReady, ipfsError, ipfsMessage } } From a2a6720fd8d1bed092022f2d05c332f1057b699c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 9 Sep 2019 13:53:06 +0200 Subject: [PATCH 14/42] dropzone component --- client/package-lock.json | 36 ++++++++++- client/package.json | 1 + .../components/molecules/Dropzone.module.scss | 36 +++++++++++ .../components/molecules/Dropzone.test.tsx | 52 ++++++++++++++++ client/src/components/molecules/Dropzone.tsx | 34 +++++++++++ client/src/hooks/use-ipfs-api.tsx | 17 ++++-- .../index.module.scss} | 2 +- .../{Ipfs.test.tsx => Ipfs/index.test.tsx} | 6 +- .../Files/{Ipfs.tsx => Ipfs/index.tsx} | 59 ++++++------------- .../routes/Publish/Files/Ipfs/utils.test.tsx | 9 +++ .../src/routes/Publish/Files/Ipfs/utils.tsx | 24 ++++++++ 11 files changed, 223 insertions(+), 53 deletions(-) create mode 100644 client/src/components/molecules/Dropzone.module.scss create mode 100644 client/src/components/molecules/Dropzone.test.tsx create mode 100644 client/src/components/molecules/Dropzone.tsx rename client/src/routes/Publish/Files/{Ipfs.module.scss => Ipfs/index.module.scss} (96%) rename client/src/routes/Publish/Files/{Ipfs.test.tsx => Ipfs/index.test.tsx} (72%) rename client/src/routes/Publish/Files/{Ipfs.tsx => Ipfs/index.tsx} (59%) create mode 100644 client/src/routes/Publish/Files/Ipfs/utils.test.tsx create mode 100644 client/src/routes/Publish/Files/Ipfs/utils.tsx diff --git a/client/package-lock.json b/client/package-lock.json index 208eda2..51da266 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -3870,6 +3870,21 @@ "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=" }, + "attr-accept": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/attr-accept/-/attr-accept-1.1.3.tgz", + "integrity": "sha512-iT40nudw8zmCweivz6j58g+RT33I4KbaIvRUhjNmDwO2WmsQUxFEZZYZ5w3vXe5x5MX9D7mfvA/XaLOZYFR9EQ==", + "requires": { + "core-js": "^2.5.0" + }, + "dependencies": { + "core-js": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.9.tgz", + "integrity": "sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==" + } + } + }, "autoprefixer": { "version": "9.6.1", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.6.1.tgz", @@ -8657,6 +8672,14 @@ "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.2.tgz", "integrity": "sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw==" }, + "file-selector": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/file-selector/-/file-selector-0.1.12.tgz", + "integrity": "sha512-Kx7RTzxyQipHuiqyZGf+Nz4vY9R1XGxuQl/hLoJwq+J4avk/9wxxgZyHKtbyIPJmbD4A66DWGYfyykWNpcYutQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "file-type": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/file-type/-/file-type-5.2.0.tgz", @@ -20906,6 +20929,16 @@ "object.pick": "^1.3.0" } }, + "react-dropzone": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-10.1.8.tgz", + "integrity": "sha512-Lm6+TxIDf/my4i3VdYmufRcrJ4SUbSTJP3HB49V2+HNjZwLI4NKVkaNRHwwSm9CEuzMP+6SW7pT1txc1uBPfDg==", + "requires": { + "attr-accept": "^1.1.3", + "file-selector": "^0.1.11", + "prop-types": "^15.7.2" + } + }, "react-error-overlay": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.1.tgz", @@ -24177,8 +24210,7 @@ "tslib": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", - "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", - "dev": true + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "tsutils": { "version": "3.17.1", diff --git a/client/package.json b/client/package.json index 6c94a34..d3d0aaf 100644 --- a/client/package.json +++ b/client/package.json @@ -33,6 +33,7 @@ "react-datepicker": "^2.8.0", "react-dom": "16.8.6", "react-dotdotdot": "^1.3.1", + "react-dropzone": "^10.1.8", "react-ga": "^2.6.0", "react-helmet": "^5.2.1", "react-markdown": "^4.1.0", diff --git a/client/src/components/molecules/Dropzone.module.scss b/client/src/components/molecules/Dropzone.module.scss new file mode 100644 index 0000000..8f9b051 --- /dev/null +++ b/client/src/components/molecules/Dropzone.module.scss @@ -0,0 +1,36 @@ +@import '../../styles/variables'; + +.dropzone { + margin-top: $spacer; + margin-bottom: $spacer; + border: .2rem dashed $brand-grey-lighter; + border-radius: 1rem; + padding: $spacer; + background: $brand-white; + transition: .2s ease-out; + cursor: pointer; + + p { + text-align: center; + margin-bottom: 0; + font-size: $font-size-small; + color: $brand-grey-light; + } + + &:focus, + &:active { + border-color: $brand-grey-light; + outline: 0; + } +} + +.dragover { + composes: dropzone; + border-color: $brand-pink; +} + +.disabled { + composes: dropzone; + opacity: .5; + pointer-events: none; +} diff --git a/client/src/components/molecules/Dropzone.test.tsx b/client/src/components/molecules/Dropzone.test.tsx new file mode 100644 index 0000000..0bb858b --- /dev/null +++ b/client/src/components/molecules/Dropzone.test.tsx @@ -0,0 +1,52 @@ +import React from 'react' +import { fireEvent, render } from '@testing-library/react' +import Dropzone from './Dropzone' + +function mockData(files: any) { + return { + dataTransfer: { + files, + items: files.map((file: any) => ({ + kind: 'file', + type: file.type, + getAsFile: () => file + })), + types: ['Files'] + } + } +} + +function flushPromises(ui: any, container: any) { + return new Promise(resolve => + setImmediate(() => { + render(ui, { container }) + resolve(container) + }) + ) +} + +function dispatchEvt(node: any, type: string, data: any) { + const event = new Event(type, { bubbles: true }) + Object.assign(event, data) + fireEvent(node, event) +} + +test('invoke onDragEnter when dragenter event occurs', async () => { + const file = new File([JSON.stringify({ ping: true })], 'ping.json', { + type: 'application/json' + }) + const data = mockData([file]) + const handleOnDrop = jest.fn() + + const ui = + const { container } = render(ui) + + // drop a file + const dropzone = container.querySelector('div') + dispatchEvt(dropzone, 'dragenter', data) + dispatchEvt(dropzone, 'dragover', data) + dispatchEvt(dropzone, 'drop', data) + await flushPromises(ui, container) + + expect(handleOnDrop).toHaveBeenCalled() +}) diff --git a/client/src/components/molecules/Dropzone.tsx b/client/src/components/molecules/Dropzone.tsx new file mode 100644 index 0000000..08974b6 --- /dev/null +++ b/client/src/components/molecules/Dropzone.tsx @@ -0,0 +1,34 @@ +import React, { useCallback } from 'react' +import { useDropzone } from 'react-dropzone' +import styles from './Dropzone.module.scss' + +export default function Dropzone({ + handleOnDrop, + disabled +}: { + handleOnDrop(files: FileList): void + disabled?: boolean +}) { + const onDrop = useCallback(acceptedFiles => handleOnDrop(acceptedFiles), [ + handleOnDrop + ]) + + const { getRootProps, getInputProps, isDragActive } = useDropzone({ + onDrop + }) + + return ( +
+ +

{`Drag 'n' drop some files here, or click to select files`}

+
+ ) +} diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index 2b2dd16..52f8ad9 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -7,19 +7,21 @@ let ipfs: any = null let ipfsMessage = '' let ipfsVersion = '' -export default function useIpfsApi(config: { +interface IpfsConfig { host: string port: string protocol: string -}) { +} + +export default function useIpfsApi(config: IpfsConfig) { const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) const [ipfsError, setIpfsError] = useState(null) useEffect(() => { async function initIpfs() { - ipfsMessage = 'Checking IPFS gateway...' + if (ipfs !== null) return - if (ipfs) return + ipfsMessage = 'Checking IPFS gateway...' try { const message = 'Connected to IPFS gateway' @@ -35,8 +37,11 @@ export default function useIpfsApi(config: { } setIpfsReady(Boolean(ipfs)) } - initIpfs() + initIpfs() + }, [config]) + + useEffect(() => { // just like componentWillUnmount() return function cleanup() { if (ipfs) { @@ -47,7 +52,7 @@ export default function useIpfsApi(config: { setIpfsError(null) } } - }, [config]) + }, []) return { ipfs, ipfsVersion, isIpfsReady, ipfsError, ipfsMessage } } diff --git a/client/src/routes/Publish/Files/Ipfs.module.scss b/client/src/routes/Publish/Files/Ipfs/index.module.scss similarity index 96% rename from client/src/routes/Publish/Files/Ipfs.module.scss rename to client/src/routes/Publish/Files/Ipfs/index.module.scss index d71a6b3..7412d24 100644 --- a/client/src/routes/Publish/Files/Ipfs.module.scss +++ b/client/src/routes/Publish/Files/Ipfs/index.module.scss @@ -1,4 +1,4 @@ -@import '../../../styles/variables'; +@import '../../../../styles/variables'; .ipfsForm { margin-top: $spacer / 2; diff --git a/client/src/routes/Publish/Files/Ipfs.test.tsx b/client/src/routes/Publish/Files/Ipfs/index.test.tsx similarity index 72% rename from client/src/routes/Publish/Files/Ipfs.test.tsx rename to client/src/routes/Publish/Files/Ipfs/index.test.tsx index db34471..25ab453 100644 --- a/client/src/routes/Publish/Files/Ipfs.test.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.test.tsx @@ -1,12 +1,14 @@ import React from 'react' import { render } from '@testing-library/react' -import Ipfs from './Ipfs' +import Ipfs from '.' const addFile = jest.fn() describe('Ipfs', () => { + const ui = + it('renders without crashing', async () => { - const { container, findByText } = render() + const { container, findByText } = render(ui) expect(container.firstChild).toBeInTheDocument() // wait for IPFS node diff --git a/client/src/routes/Publish/Files/Ipfs.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx similarity index 59% rename from client/src/routes/Publish/Files/Ipfs.tsx rename to client/src/routes/Publish/Files/Ipfs/index.tsx index cbe05d7..ab3cd01 100644 --- a/client/src/routes/Publish/Files/Ipfs.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -1,33 +1,12 @@ /* eslint-disable no-console */ import React, { useState } from 'react' -import axios from 'axios' -import useIpfsApi from '../../../hooks/use-ipfs-api' -import Label from '../../../components/atoms/Form/Label' -import Spinner from '../../../components/atoms/Spinner' -import styles from './Ipfs.module.scss' - -async function pingUrl(url: string) { - try { - const response = await axios(url) - if (response.status !== 200) console.error(`Not found: ${url}`) - - console.log(`File found: ${url}`) - return - } catch (error) { - console.error(error.message) - } -} - -function formatBytes(a: number, b: number) { - if (a === 0) return '0 Bytes' - const c = 1024 - const d = b || 2 - const e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] - const f = Math.floor(Math.log(a) / Math.log(c)) - - return parseFloat((a / Math.pow(c, f)).toFixed(d)) + ' ' + e[f] -} +import useIpfsApi from '../../../../hooks/use-ipfs-api' +import Label from '../../../../components/atoms/Form/Label' +import Spinner from '../../../../components/atoms/Spinner' +import Dropzone from '../../../../components/molecules/Dropzone' +import { formatBytes, pingUrl } from './utils' +import styles from './index.module.scss' export default function Ipfs({ addFile }: { addFile(url: string): void }) { const config = { @@ -80,15 +59,17 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { } } - function handleCaptureFile(files: FileList | null) { - const reader: any = new window.FileReader() - const file = files && files[0] + function handleOnDrop(files: any) { + const reader: any = new FileReader() - reader.readAsArrayBuffer(file) - reader.onloadend = () => { - const buffer: any = Buffer.from(reader.result) - saveToIpfs(buffer) - } + files && + files.forEach((file: File) => { + reader.readAsArrayBuffer(file) + reader.onloadend = () => { + const buffer: any = Buffer.from(reader.result) + saveToIpfs(buffer) + } + }) } return ( @@ -99,13 +80,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { {loading ? ( ) : ( - handleCaptureFile(e.target.files)} - disabled={!isIpfsReady} - /> + )} {ipfsMessage !== '' && (
diff --git a/client/src/routes/Publish/Files/Ipfs/utils.test.tsx b/client/src/routes/Publish/Files/Ipfs/utils.test.tsx new file mode 100644 index 0000000..cc43eb2 --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs/utils.test.tsx @@ -0,0 +1,9 @@ +import { formatBytes } from './utils' + +describe('utils', () => { + it('formatBytes outputs as expected', () => { + const number = 1024 + const output = formatBytes(number, 0) + expect(output).toBe('1 KB') + }) +}) diff --git a/client/src/routes/Publish/Files/Ipfs/utils.tsx b/client/src/routes/Publish/Files/Ipfs/utils.tsx new file mode 100644 index 0000000..c64937e --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs/utils.tsx @@ -0,0 +1,24 @@ +/* eslint-disable no-console */ +import axios from 'axios' + +export async function pingUrl(url: string) { + try { + const response = await axios(url) + if (response.status !== 200) console.error(`Not found: ${url}`) + + console.log(`File found: ${url}`) + return + } catch (error) { + console.error(error.message) + } +} + +export function formatBytes(a: number, b: number) { + if (a === 0) return '0 Bytes' + const c = 1024 + const d = b || 2 + const e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] + const f = Math.floor(Math.log(a) / Math.log(c)) + + return parseFloat((a / Math.pow(c, f)).toFixed(d)) + ' ' + e[f] +} From 839140d90686ed95c1864b822c3010748a5a3ddd Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 9 Sep 2019 15:13:44 +0200 Subject: [PATCH 15/42] tweaks --- .../components/molecules/Dropzone.module.scss | 3 +- client/src/components/molecules/Dropzone.tsx | 2 +- .../src/routes/Publish/Files/Ipfs/index.tsx | 49 +++++++++---------- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/client/src/components/molecules/Dropzone.module.scss b/client/src/components/molecules/Dropzone.module.scss index 8f9b051..a6518ab 100644 --- a/client/src/components/molecules/Dropzone.module.scss +++ b/client/src/components/molecules/Dropzone.module.scss @@ -4,7 +4,7 @@ margin-top: $spacer; margin-bottom: $spacer; border: .2rem dashed $brand-grey-lighter; - border-radius: 1rem; + border-radius: $border-radius * 2; padding: $spacer; background: $brand-white; transition: .2s ease-out; @@ -17,6 +17,7 @@ color: $brand-grey-light; } + &:hover, &:focus, &:active { border-color: $brand-grey-light; diff --git a/client/src/components/molecules/Dropzone.tsx b/client/src/components/molecules/Dropzone.tsx index 08974b6..d8ed890 100644 --- a/client/src/components/molecules/Dropzone.tsx +++ b/client/src/components/molecules/Dropzone.tsx @@ -6,7 +6,7 @@ export default function Dropzone({ handleOnDrop, disabled }: { - handleOnDrop(files: FileList): void + handleOnDrop(files: File[]): void disabled?: boolean }) { const onDrop = useCallback(acceptedFiles => handleOnDrop(acceptedFiles), [ diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index ab3cd01..161d031 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -8,13 +8,13 @@ import Dropzone from '../../../../components/molecules/Dropzone' import { formatBytes, pingUrl } from './utils' import styles from './index.module.scss' -export default function Ipfs({ addFile }: { addFile(url: string): void }) { - const config = { - host: 'ipfs.infura.io', - port: '5001', - protocol: 'https' - } +const config = { + host: 'ipfs.infura.io', + port: '5001', + protocol: 'https' +} +export default function Ipfs({ addFile }: { addFile(url: string): void }) { const { ipfs, ipfsVersion, @@ -26,16 +26,24 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') - async function saveToIpfs(buffer: Buffer) { + async function saveToIpfs( + data: File | Buffer | ReadableStream, + size: number + ) { + const totalSize = formatBytes(size, 0) + setLoading(true) - setMessage('Adding to remote IPFS node
') + setMessage(`Adding to IPFS
0/${totalSize}
`) try { - const response = await ipfs.add(buffer, { + const response = await ipfs.add(data, { progress: (length: number) => setMessage( - `Adding to remote IPFS node
- ${formatBytes(length, 0)}` + `Adding to IPFS
+ ${formatBytes( + length, + 0 + )}/${totalSize}
` ) }) @@ -43,9 +51,9 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { console.log(`File added: ${cid}`) // Ping gateway url to make it globally available, - // but store ipfs.io url in DDO. + // but store native url in DDO. // https://ipfs.github.io/public-gateway-checker/ - const url = `https://ipfs.io/ipfs/${cid}` + const url = `ipfs://${cid}` const urlGateway = `https://ipfs.infura.io/ipfs/${cid}` setMessage('Checking IPFS gateway URL') @@ -54,22 +62,13 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { // add IPFS url to file.url addFile(url) } catch (error) { - console.error(error.message) + console.error(`Adding to IPFS failed: ${error.message}`) setLoading(false) } } - function handleOnDrop(files: any) { - const reader: any = new FileReader() - - files && - files.forEach((file: File) => { - reader.readAsArrayBuffer(file) - reader.onloadend = () => { - const buffer: any = Buffer.from(reader.result) - saveToIpfs(buffer) - } - }) + function handleOnDrop(files: File[]) { + files.forEach((file: File) => saveToIpfs(file, file.size)) } return ( From 2f741d300e6ab1f90db0395796bede461a246d07 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 9 Sep 2019 18:06:33 +0200 Subject: [PATCH 16/42] fix file adding on faulty url checker response --- client/src/routes/Publish/Files/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index b27d779..fc38b6f 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -89,10 +89,10 @@ export default class Files extends PureComponent { const { contentLength, contentType, found } = response.data.result - file.contentLength = contentLength - file.contentType = contentType - file.compression = cleanupContentType(contentType) - file.found = found + if (contentLength) file.contentLength = contentLength + if (contentType) file.contentType = contentType + if (contentType) file.compression = cleanupContentType(contentType) + if (found) file.found = found return file } catch (error) { From da357b82c21bccd6a2bb6239427382db036cd339 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 9 Sep 2019 22:22:25 +0200 Subject: [PATCH 17/42] add content-range --- server/src/routes/UrlCheckRouter.ts | 39 ++++++++++++++++++----------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/server/src/routes/UrlCheckRouter.ts b/server/src/routes/UrlCheckRouter.ts index 00e1a12..91951c2 100644 --- a/server/src/routes/UrlCheckRouter.ts +++ b/server/src/routes/UrlCheckRouter.ts @@ -32,34 +32,45 @@ export class UrlCheckRouter { headers: { Range: 'bytes=0-' } }, (error, response) => { - if ( - response && - (response.statusCode.toString().startsWith('2') || - response.statusCode.toString().startsWith('416')) - ) { + const { headers, statusCode } = response + const successResponses = + statusCode.toString().startsWith('2') || + statusCode.toString().startsWith('416') + + if (response && successResponses) { const result: any = {} result.found = true - if (response.headers['content-length']) { + if (headers['content-length']) { result.contentLength = parseInt( - response.headers['content-length'] + headers['content-length'] ) // convert to number } - if (response.headers['content-type']) { - const typeAndCharset = response.headers[ - 'content-type' - ].split(';') + // sometimes servers send content-range header, + // try to use it if content-length is not present + if ( + headers['content-range'] && + !headers['content-length'] + ) { + const size = headers['content-range'].split('/')[1] + result.contentLength = parseInt(size) // convert to number + } - result.contentType = typeAndCharset[0] // eslint-disable-line prefer-destructuring + if (headers['content-type']) { + const typeAndCharset = headers['content-type'].split( + ';' + ) + + /* eslint-disable prefer-destructuring */ + result.contentType = typeAndCharset[0] if (typeAndCharset[1]) { - /* eslint-disable prefer-destructuring */ result.contentCharset = typeAndCharset[1].split( '=' )[1] - /* eslint-enable prefer-destructuring */ } + /* eslint-enable prefer-destructuring */ } return res.send({ status: 'success', result }) } From e512ed4471b95fe39c38f9451c8e6d40ef8f7807 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 9 Sep 2019 22:23:29 +0200 Subject: [PATCH 18/42] IPFS publishing fixes, allow dropping multiple files --- client/.env.local.example | 1 + client/src/config.ts | 3 +++ client/src/hooks/use-ipfs-api.tsx | 2 +- .../src/routes/Publish/Files/Ipfs/index.tsx | 19 ++++++++++++------- client/src/routes/Publish/Files/index.tsx | 2 ++ 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/client/.env.local.example b/client/.env.local.example index 27aa7b2..afc8d91 100644 --- a/client/.env.local.example +++ b/client/.env.local.example @@ -59,3 +59,4 @@ REACT_APP_REPORT_EMAIL="test@example.com" # REACT_APP_SHOW_CHANNELS=true # REACT_APP_ALLOW_PRICING=true # REACT_APP_SHOW_REQUEST_TOKENS_BUTTON=true +# REACT_APP_IPFS_GATEWAY_URI="https://gateway.ipfs.io" diff --git a/client/src/config.ts b/client/src/config.ts index c3b7875..9439cab 100644 --- a/client/src/config.ts +++ b/client/src/config.ts @@ -35,3 +35,6 @@ export const allowPricing = process.env.REACT_APP_ALLOW_PRICING === 'true' || false export const showRequestTokens = process.env.REACT_APP_SHOW_REQUEST_TOKENS_BUTTON === 'true' || false +// https://ipfs.github.io/public-gateway-checker/ +export const ipfsGatewayUri = + process.env.REACT_APP_IPFS_GATEWAY_URI || 'https://gateway.ipfs.io' diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index 52f8ad9..40fb24f 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -24,7 +24,7 @@ export default function useIpfsApi(config: IpfsConfig) { ipfsMessage = 'Checking IPFS gateway...' try { - const message = 'Connected to IPFS gateway' + const message = `Connected to ${config.host}` console.time(message) ipfs = await ipfsClient(config) console.timeEnd(message) diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index 161d031..6810d68 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -6,6 +6,7 @@ import Label from '../../../../components/atoms/Form/Label' import Spinner from '../../../../components/atoms/Spinner' import Dropzone from '../../../../components/molecules/Dropzone' import { formatBytes, pingUrl } from './utils' +import { ipfsGatewayUri } from '../../../../config' import styles from './index.module.scss' const config = { @@ -26,10 +27,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') - async function saveToIpfs( - data: File | Buffer | ReadableStream, - size: number - ) { + async function saveToIpfs(data: Buffer, size: number) { const totalSize = formatBytes(size, 0) setLoading(true) @@ -52,9 +50,8 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { // Ping gateway url to make it globally available, // but store native url in DDO. - // https://ipfs.github.io/public-gateway-checker/ + const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}` const url = `ipfs://${cid}` - const urlGateway = `https://ipfs.infura.io/ipfs/${cid}` setMessage('Checking IPFS gateway URL') await pingUrl(urlGateway) @@ -68,7 +65,15 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { } function handleOnDrop(files: File[]) { - files.forEach((file: File) => saveToIpfs(file, file.size)) + files.forEach((file: File) => { + const reader: any = new FileReader() + + reader.readAsArrayBuffer(file) + reader.onloadend = () => { + const buffer: any = Buffer.from(reader.result) + saveToIpfs(buffer, file.size) + } + }) } return ( diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index fc38b6f..50a0515 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -128,6 +128,8 @@ export default class Files extends PureComponent { isFormShown: false, isIpfsFormShown: false }) + + this.forceUpdate() } private removeFile = (index: number) => { From be7020bcebf9763109a18efb6b0617262cff996a Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 9 Sep 2019 22:34:22 +0200 Subject: [PATCH 19/42] downgrade @typescript-eslint packages --- package-lock.json | 46 +++++++++++++++++++++++++++------------------- package.json | 4 ++-- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7afa7c5..15127d3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -513,49 +513,57 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.0.0.tgz", - "integrity": "sha512-Mo45nxTTELODdl7CgpZKJISvLb+Fu64OOO2ZFc2x8sYSnUpFrBUW3H+H/ZGYmEkfnL6VkdtOSxgdt+Av79j0sA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.13.0.tgz", + "integrity": "sha512-WQHCozMnuNADiqMtsNzp96FNox5sOVpU8Xt4meaT4em8lOG1SrOv92/mUbEHQVh90sldKSfcOc/I0FOb/14G1g==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "2.0.0", - "eslint-utils": "^1.4.0", + "@typescript-eslint/experimental-utils": "1.13.0", + "eslint-utils": "^1.3.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^2.0.1", - "tsutils": "^3.14.0" + "tsutils": "^3.7.0" } }, "@typescript-eslint/experimental-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.0.0.tgz", - "integrity": "sha512-XGJG6GNBXIEx/mN4eTRypN/EUmsd0VhVGQ1AG+WTgdvjHl0G8vHhVBHrd/5oI6RRYBRnedNymSYWW1HAdivtmg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz", + "integrity": "sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.0.0", + "@typescript-eslint/typescript-estree": "1.13.0", "eslint-scope": "^4.0.0" } }, "@typescript-eslint/parser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.0.0.tgz", - "integrity": "sha512-ibyMBMr0383ZKserIsp67+WnNVoM402HKkxqXGlxEZsXtnGGurbnY90pBO3e0nBUM7chEEOcxUhgw9aPq7fEBA==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.13.0.tgz", + "integrity": "sha512-ITMBs52PCPgLb2nGPoeT4iU3HdQZHcPaZVw+7CsFagRJHUhyeTgorEwHXhFf3e7Evzi8oujKNpHc8TONth8AdQ==", "dev": true, "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "2.0.0", - "@typescript-eslint/typescript-estree": "2.0.0", + "@typescript-eslint/experimental-utils": "1.13.0", + "@typescript-eslint/typescript-estree": "1.13.0", "eslint-visitor-keys": "^1.0.0" } }, "@typescript-eslint/typescript-estree": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.0.0.tgz", - "integrity": "sha512-NXbmzA3vWrSgavymlzMWNecgNOuiMMp62MO3kI7awZRLRcsA1QrYWo6q08m++uuAGVbXH/prZi2y1AWuhSu63w==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz", + "integrity": "sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw==", "dev": true, "requires": { "lodash.unescape": "4.0.1", - "semver": "^6.2.0" + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } } }, "acorn": { diff --git a/package.json b/package.json index ac56eae..df68f5f 100644 --- a/package.json +++ b/package.json @@ -25,8 +25,8 @@ "dependencies": {}, "devDependencies": { "@release-it/bumper": "^1.0.3", - "@typescript-eslint/eslint-plugin": "^2.0.0", - "@typescript-eslint/parser": "^2.0.0", + "@typescript-eslint/eslint-plugin": "^1.13.0", + "@typescript-eslint/parser": "^1.13.0", "auto-changelog": "^1.16.0", "concurrently": "^4.1.2", "cypress": "^3.4.1", From 3d1d81ffe95832294b5944d5a3ee444926d90904 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 9 Sep 2019 23:38:12 +0200 Subject: [PATCH 20/42] update tests --- client/src/components/atoms/Spinner.test.tsx | 15 +++++++ .../organisms/WalletSelector.test.tsx | 6 +-- .../templates/Asset/Report.test.tsx | 25 +++++++++++- .../routes/Publish/Files/Ipfs/index.test.tsx | 4 +- .../routes/Publish/Files/Ipfs/utils.test.tsx | 40 ++++++++++++++++++- .../src/routes/Publish/Files/index.test.tsx | 31 +++++++++++++- 6 files changed, 113 insertions(+), 8 deletions(-) create mode 100644 client/src/components/atoms/Spinner.test.tsx diff --git a/client/src/components/atoms/Spinner.test.tsx b/client/src/components/atoms/Spinner.test.tsx new file mode 100644 index 0000000..be5d0be --- /dev/null +++ b/client/src/components/atoms/Spinner.test.tsx @@ -0,0 +1,15 @@ +import React from 'react' +import { render } from '@testing-library/react' +import Spinner from './Spinner' + +describe('Spinner', () => { + it('renders without crashing', () => { + const { container } = render() + expect(container.firstChild).toBeInTheDocument() + }) + + it('renders small variant', () => { + const { container } = render() + expect(container.firstChild).toBeInTheDocument() + }) +}) diff --git a/client/src/components/organisms/WalletSelector.test.tsx b/client/src/components/organisms/WalletSelector.test.tsx index ac9e4d9..70d4569 100644 --- a/client/src/components/organisms/WalletSelector.test.tsx +++ b/client/src/components/organisms/WalletSelector.test.tsx @@ -7,7 +7,7 @@ import { userMockConnected } from '../../../__mocks__/user-mock' import { marketMock } from '../../../__mocks__/market-mock' describe('WalletSelector', () => { - it('renders without crashing', async () => { + it('renders without crashing', () => { ReactModal.setAppElement(document.createElement('div')) const { container, getByText } = render( @@ -20,11 +20,11 @@ describe('WalletSelector', () => { expect(container.firstChild).toBeInTheDocument() fireEvent.click(getByText('Select wallet')) - const burnerButton = await getByText('Burner Wallet') + const burnerButton = getByText('Burner Wallet') fireEvent.click(burnerButton) fireEvent.click(getByText('Select wallet')) - // const metamaskButton = await getByText('MetaMask') + // const metamaskButton = getByText('MetaMask') // fireEvent.click(metamaskButton) }) }) diff --git a/client/src/components/templates/Asset/Report.test.tsx b/client/src/components/templates/Asset/Report.test.tsx index f6b8942..b89d155 100644 --- a/client/src/components/templates/Asset/Report.test.tsx +++ b/client/src/components/templates/Asset/Report.test.tsx @@ -34,7 +34,30 @@ describe('Report', () => { expect(comment).toHaveTextContent('Plants') fireEvent.click(getByTestId('report')) mockAxios.mockResponse(mockResponse) - // expect(mockAxios.post).toHaveBeenCalled() + expect(mockAxios).toHaveBeenCalled() + + // close modal + fireEvent.click(getByTestId('closeModal')) + }) + + it('catches response error', async () => { + ReactModal.setAppElement(document.createElement('div')) + + const { getByText, getByLabelText, getByTestId } = render( + + ) + // open modal + fireEvent.click(getByText('Report Data Set')) + await wait(() => expect(getByText('did:xxx')).toBeInTheDocument()) + + // add comment + const comment = getByLabelText('Comment') + fireEvent.change(comment, { + target: { value: 'Plants' } + }) + expect(comment).toHaveTextContent('Plants') + fireEvent.click(getByTestId('report')) + mockAxios.mockError({ message: 'Error catch' }) // close modal fireEvent.click(getByTestId('closeModal')) diff --git a/client/src/routes/Publish/Files/Ipfs/index.test.tsx b/client/src/routes/Publish/Files/Ipfs/index.test.tsx index 25ab453..ffa6384 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.test.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { render } from '@testing-library/react' +import { render, fireEvent, act } from '@testing-library/react' import Ipfs from '.' const addFile = jest.fn() @@ -12,6 +12,6 @@ describe('Ipfs', () => { expect(container.firstChild).toBeInTheDocument() // wait for IPFS node - await findByText(/IPFS /) + await findByText(/Connected to /) }) }) diff --git a/client/src/routes/Publish/Files/Ipfs/utils.test.tsx b/client/src/routes/Publish/Files/Ipfs/utils.test.tsx index cc43eb2..de8f643 100644 --- a/client/src/routes/Publish/Files/Ipfs/utils.test.tsx +++ b/client/src/routes/Publish/Files/Ipfs/utils.test.tsx @@ -1,4 +1,20 @@ -import { formatBytes } from './utils' +import mockAxios from 'jest-mock-axios' +import { formatBytes, pingUrl } from './utils' + +const mockResponse = { + status: 200, + data: {} +} + +const mockResponseFaulty = { + status: 404, + statusText: 'Not Found', + data: {} +} + +afterEach(() => { + mockAxios.reset() +}) describe('utils', () => { it('formatBytes outputs as expected', () => { @@ -6,4 +22,26 @@ describe('utils', () => { const output = formatBytes(number, 0) expect(output).toBe('1 KB') }) + + it('formatBytes 0 conversion', () => { + const number = 0 + const output = formatBytes(number, 0) + expect(output).toBe('0 Bytes') + }) + + it('pingUrl can be called', () => { + pingUrl('https://oceanprotocol.com') + mockAxios.mockResponse(mockResponse) + expect(mockAxios).toHaveBeenCalled() + }) + + it('pingUrl can be called with non 200 response', () => { + pingUrl('https://oceanprotocol.com') + mockAxios.mockResponse(mockResponseFaulty) + }) + + it('pingUrl error catch', () => { + pingUrl('https://oceanprotocol.com') + mockAxios.mockError({ message: 'Error catch' }) + }) }) diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index 5b7d9da..13fa14f 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -34,6 +34,35 @@ const mockResponse = { } } +function flushPromises(ui: any, container: any) { + return new Promise(resolve => + setImmediate(() => { + render(ui, { container }) + resolve(container) + }) + ) +} + +function dispatchEvt(node: any, type: string, data: any) { + const event = new Event(type, { bubbles: true }) + Object.assign(event, data) + fireEvent(node, event) +} + +function mockData(files: any) { + return { + dataTransfer: { + files, + items: files.map((file: any) => ({ + kind: 'file', + type: file.type, + getAsFile: () => file + })), + types: ['Files'] + } + } +} + const renderComponent = () => render( { expect(container.querySelector('.ipfsForm')).toBeInTheDocument() // wait for IPFS node - await findByText(/IPFS /) + await findByText(/Connected to /) // close fireEvent.click(getByText('- Cancel')) From 725215b6ee0b065855f55b7124340abf63a0b357 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 10 Sep 2019 10:25:40 +0200 Subject: [PATCH 21/42] new client package-lock --- client/package-lock.json | 2576 +++++++++++++------------------------- 1 file changed, 886 insertions(+), 1690 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 51da266..6639a12 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1049,9 +1049,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1069,9 +1069,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1084,9 +1084,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1099,9 +1099,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1115,9 +1115,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1136,9 +1136,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1154,9 +1154,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1170,9 +1170,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1223,9 +1223,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1240,9 +1240,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1265,9 +1265,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1283,9 +1283,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1315,9 +1315,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1331,9 +1331,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1350,9 +1350,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1366,9 +1366,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1382,9 +1382,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1398,9 +1398,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1419,9 +1419,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1440,9 +1440,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1475,9 +1475,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -1492,98 +1492,64 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, "@jest/console": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", - "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "version": "24.7.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.7.1.tgz", + "integrity": "sha512-iNhtIy2M8bXlAOULWVTUxmnelTLFneTNEkHCgPmgd+zNwy9zVddJ6oS5rZ9iwoscNdT5mMwUd0C51v/fSlzItg==", "dev": true, "requires": { - "@jest/source-map": "^24.9.0", + "@jest/source-map": "^24.3.0", "chalk": "^2.0.1", "slash": "^2.0.0" } }, "@jest/core": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz", - "integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.8.0.tgz", + "integrity": "sha512-R9rhAJwCBQzaRnrRgAdVfnglUuATXdwTRsYqs6NMdVcAl5euG8LtWDe+fVkN27YfKVBW61IojVsXKaOmSnqd/A==", "dev": true, "requires": { "@jest/console": "^24.7.1", - "@jest/reporters": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/reporters": "^24.8.0", + "@jest/test-result": "^24.8.0", + "@jest/transform": "^24.8.0", + "@jest/types": "^24.8.0", "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", "exit": "^0.1.2", "graceful-fs": "^4.1.15", - "jest-changed-files": "^24.9.0", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", + "jest-changed-files": "^24.8.0", + "jest-config": "^24.8.0", + "jest-haste-map": "^24.8.0", + "jest-message-util": "^24.8.0", "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-resolve-dependencies": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", - "jest-watcher": "^24.9.0", + "jest-resolve-dependencies": "^24.8.0", + "jest-runner": "^24.8.0", + "jest-runtime": "^24.8.0", + "jest-snapshot": "^24.8.0", + "jest-util": "^24.8.0", + "jest-validate": "^24.8.0", + "jest-watcher": "^24.8.0", "micromatch": "^3.1.10", "p-each-series": "^1.0.0", + "pirates": "^4.0.1", "realpath-native": "^1.1.0", "rimraf": "^2.5.4", - "slash": "^2.0.0", "strip-ansi": "^5.0.0" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "browser-resolve": "^1.11.3", - "chalk": "^2.0.1", - "jest-pnp-resolver": "^1.2.1", - "realpath-native": "^1.1.0" - } - }, "strip-ansi": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", @@ -1596,82 +1562,38 @@ } }, "@jest/environment": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.9.0.tgz", - "integrity": "sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-24.8.0.tgz", + "integrity": "sha512-vlGt2HLg7qM+vtBrSkjDxk9K0YtRBi7HfRFaDxoRtyi+DyVChzhF20duvpdAnKVBV6W5tym8jm0U9EfXbDk1tw==", "dev": true, "requires": { - "@jest/fake-timers": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } + "@jest/fake-timers": "^24.8.0", + "@jest/transform": "^24.8.0", + "@jest/types": "^24.8.0", + "jest-mock": "^24.8.0" } }, "@jest/fake-timers": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.9.0.tgz", - "integrity": "sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-24.8.0.tgz", + "integrity": "sha512-2M4d5MufVXwi6VzZhJ9f5S/wU4ud2ck0kxPof1Iz3zWx6Y+V2eJrES9jEktB6O3o/oEyk+il/uNu9PvASjWXQw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } + "@jest/types": "^24.8.0", + "jest-message-util": "^24.8.0", + "jest-mock": "^24.8.0" } }, "@jest/reporters": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", - "integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.8.0.tgz", + "integrity": "sha512-eZ9TyUYpyIIXfYCrw0UHUWUvE35vx5I92HGMgS93Pv7du+GHIzl+/vh8Qj9MCWFK/4TqyttVBPakWMOfZRIfxw==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/environment": "^24.8.0", + "@jest/test-result": "^24.8.0", + "@jest/transform": "^24.8.0", + "@jest/types": "^24.8.0", "chalk": "^2.0.1", "exit": "^0.1.2", "glob": "^7.1.2", @@ -1679,45 +1601,25 @@ "istanbul-lib-instrument": "^3.0.1", "istanbul-lib-report": "^2.0.4", "istanbul-lib-source-maps": "^3.0.1", - "istanbul-reports": "^2.2.6", - "jest-haste-map": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", + "istanbul-reports": "^2.1.1", + "jest-haste-map": "^24.8.0", + "jest-resolve": "^24.8.0", + "jest-runtime": "^24.8.0", + "jest-util": "^24.8.0", "jest-worker": "^24.6.0", - "node-notifier": "^5.4.2", + "node-notifier": "^5.2.1", "slash": "^2.0.0", "source-map": "^0.6.0", "string-length": "^2.0.0" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.8.0.tgz", + "integrity": "sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "jest-pnp-resolver": "^1.2.1", @@ -1733,9 +1635,9 @@ } }, "@jest/source-map": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", - "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.3.0.tgz", + "integrity": "sha512-zALZt1t2ou8le/crCeeiRYzvdnTzaIlpOWaet45lNSqNJUnXbppUUFR4ZUAlzgDmKee4Q5P/tKXypI1RiHwgag==", "dev": true, "requires": { "callsites": "^3.0.0", @@ -1758,94 +1660,51 @@ } }, "@jest/test-result": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", - "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.8.0.tgz", + "integrity": "sha512-+YdLlxwizlfqkFDh7Mc7ONPQAhA4YylU1s529vVM1rsf67vGZH/2GGm5uO8QzPeVyaVMobCQ7FTxl38QrKRlng==", "dev": true, "requires": { - "@jest/console": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/console": "^24.7.1", + "@jest/types": "^24.8.0", "@types/istanbul-lib-coverage": "^2.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } } }, "@jest/test-sequencer": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", - "integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.8.0.tgz", + "integrity": "sha512-OzL/2yHyPdCHXEzhoBuq37CE99nkme15eHkAzXRVqthreWZamEMA0WoetwstsQBCXABhczpK03JNbc4L01vvLg==", "dev": true, "requires": { - "@jest/test-result": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-runner": "^24.9.0", - "jest-runtime": "^24.9.0" + "@jest/test-result": "^24.8.0", + "jest-haste-map": "^24.8.0", + "jest-runner": "^24.8.0", + "jest-runtime": "^24.8.0" } }, "@jest/transform": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.9.0.tgz", - "integrity": "sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-24.8.0.tgz", + "integrity": "sha512-xBMfFUP7TortCs0O+Xtez2W7Zu1PLH9bvJgtraN1CDST6LBM/eTOZ9SfwS/lvV8yOfcDpFmwf9bq5cYbXvqsvA==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "babel-plugin-istanbul": "^5.1.0", "chalk": "^2.0.1", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.1.15", - "jest-haste-map": "^24.9.0", - "jest-regex-util": "^24.9.0", - "jest-util": "^24.9.0", + "jest-haste-map": "^24.8.0", + "jest-regex-util": "^24.3.0", + "jest-util": "^24.8.0", "micromatch": "^3.1.10", - "pirates": "^4.0.1", "realpath-native": "^1.1.0", "slash": "^2.0.0", "source-map": "^0.6.1", "write-file-atomic": "2.4.1" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3210,9 +3069,9 @@ "dev": true }, "abab": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.1.tgz", - "integrity": "sha512-1zSbbCuoIjafKZ3mblY5ikvAb0ODUbqBnFuUb7f6uLeQhhGJ0vEV4ntmtxKLT2WgXCO94E07BjunsIw1jOMPZw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", + "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", "dev": true }, "abbrev": { @@ -3253,9 +3112,9 @@ } }, "acorn": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.3.0.tgz", - "integrity": "sha512-/czfa8BwS88b9gWQVhc8eknunSA2DoJpJyTQkhheIf5E48u1N0R4q/YxxsAeqRrmK9TQ/uYfgLDfZo91UlANIA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.1.tgz", + "integrity": "sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q==", "dev": true }, "acorn-dynamic-import": { @@ -3265,9 +3124,9 @@ "dev": true }, "acorn-globals": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.3.tgz", - "integrity": "sha512-vkR40VwS2SYO98AIeFvzWWh+xyc2qi9s7OoXSFEGIP/rOJKzjnhykaZJNnHdoq4BL2gGxI5EZOU16z896EYnOQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.2.tgz", + "integrity": "sha512-BbzvZhVtZP+Bs1J1HcwrQe8ycfO0wStkSGxuul3He3GkHOIZ6eTqOkPuw9IP1X3+IkOo4wiJmwkobzXYz4wewQ==", "dev": true, "requires": { "acorn": "^6.0.1", @@ -3275,9 +3134,9 @@ } }, "acorn-jsx": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", - "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", "dev": true }, "acorn-walk": { @@ -3287,9 +3146,9 @@ "dev": true }, "address": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/address/-/address-1.1.0.tgz", - "integrity": "sha512-4diPfzWbLEIElVG4AnqP+00SULlPzNuyJFNnmMrLgyaxG6tZXJ1sn7mjBu4fHrJE+Yp/jgylOweJn2xsLMFggQ==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/address/-/address-1.0.3.tgz", + "integrity": "sha512-z55ocwKBRLryBs394Sm3ushTtBeg6VAeuku7utSoSnsJKvKcnXFIyC6vh27n3rXyxSgkJBBCAvyOn7gSUcTYjg==", "dev": true }, "aes-js": { @@ -3620,8 +3479,8 @@ "resolved": "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz", "integrity": "sha1-FziZ0//Rx9k4PkR5Ul2+J4yrXys=", "dev": true - "array-shuffle": { }, + "array-shuffle": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-shuffle/-/array-shuffle-1.0.1.tgz", "integrity": "sha1-fqSIKjVrS8pfVF4LblLq9tlxVXo=" @@ -3821,8 +3680,8 @@ "get-iterator": "^1.0.2", "pull-stream-to-async-iterator": "^1.0.1" } - "async-iterator-to-stream": { }, + "async-iterator-to-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/async-iterator-to-stream/-/async-iterator-to-stream-1.1.0.tgz", "integrity": "sha512-ddF3u7ipixenFJsYCKqVR9tNdkIzd2j7JVg8QarqkfUl7UTR7nhJgc1Q+3ebP/5DNFhV9Co9F47FJjGpdc0PjQ==", @@ -3901,9 +3760,9 @@ }, "dependencies": { "postcss-value-parser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.2.tgz", - "integrity": "sha512-LmeoohTpp/K4UiyQCwuGWlONxXamGzCMtFxLq4W1nZVGIQLYvMCJx3yAF9qyyuFpflABI9yVdtJAqbihOsCsJQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz", + "integrity": "sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ==", "dev": true } } @@ -4016,13 +3875,13 @@ } }, "babel-jest": { - "version": "24.7.1", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.7.1.tgz", - "integrity": "sha512-GPnLqfk8Mtt0i4OemjWkChi73A3ALs4w2/QbG64uAj8b5mmwzxc7jbJVRZt8NJkxi6FopVHog9S3xX6UJKb2qg==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.8.0.tgz", + "integrity": "sha512-+5/kaZt4I9efoXzPlZASyK/lN9qdRKmmUav9smVc0ruPQD7IsfucQ87gpOE8mn2jbDuS6M/YOW6n3v9ZoIfgnw==", "dev": true, "requires": { - "@jest/transform": "^24.7.1", - "@jest/types": "^24.7.0", + "@jest/transform": "^24.8.0", + "@jest/types": "^24.8.0", "@types/babel__core": "^7.1.0", "babel-plugin-istanbul": "^5.1.0", "babel-preset-jest": "^24.6.0", @@ -4075,9 +3934,9 @@ } }, "babel-plugin-jest-hoist": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz", - "integrity": "sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw==", + "version": "24.6.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.6.0.tgz", + "integrity": "sha512-3pKNH6hMt9SbOv0F3WVmy5CWQ4uogS3k0GY5XLyQHJ9EGpAT9XWkFd2ZiXXtkwFHdAHa5j7w7kfxSP5lAIwu7w==", "dev": true, "requires": { "@types/babel__traverse": "^7.0.6" @@ -4095,9 +3954,9 @@ } }, "babel-plugin-named-asset-import": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.3.tgz", - "integrity": "sha512-1XDRysF4894BUdMChT+2HHbtJYiO7zx5Be7U6bT8dISy7OdyETMGIAQBMPQCsY1YRf0xcubwnKKaDr5bk15JTA==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.2.tgz", + "integrity": "sha512-CxwvxrZ9OirpXQ201Ec57OmGhmI8/ui/GwTDy0hSp6CmRvgRC0pSair6Z04Ck+JStA0sMPZzSJ3uE4n17EXpPQ==", "dev": true }, "babel-plugin-syntax-object-rest-spread": { @@ -4123,19 +3982,19 @@ "dev": true }, "babel-preset-jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz", - "integrity": "sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg==", + "version": "24.6.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-24.6.0.tgz", + "integrity": "sha512-pdZqLEdmy1ZK5kyRUfvBb2IfTPb2BUvIJczlPspS8fWmBQslNNDBqVfh7BW5leOVJMDZKzjD8XEyABTk6gQ5yw==", "dev": true, "requires": { "@babel/plugin-syntax-object-rest-spread": "^7.0.0", - "babel-plugin-jest-hoist": "^24.9.0" + "babel-plugin-jest-hoist": "^24.6.0" } }, "babel-preset-react-app": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-8.0.0.tgz", - "integrity": "sha512-6Dmj7e8l7eWE+R6sKKLRrGEQXMfcBqBYlphaAgT1ml8qT1NEP+CyTZyfjmgKGqHZfwH3RQCUOuP6y4mpGc7tgg==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-9.0.0.tgz", + "integrity": "sha512-YVsDA8HpAKklhFLJtl9+AgaxrDaor8gGvDFlsg1ByOS0IPGUovumdv4/gJiAnLcDmZmKlH6+9sVOz4NVW7emAg==", "dev": true, "requires": { "@babel/core": "7.4.3", @@ -4391,9 +4250,9 @@ } }, "base-x": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.6.tgz", - "integrity": "sha512-4PaF8u2+AlViJxRVjurkLTxpp7CaFRD/jo5rPT9ONnKxyhQ8f59yzamEvq7EkriG56yn5On4ONyaG75HLqr46w==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/base-x/-/base-x-3.0.7.tgz", + "integrity": "sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw==", "requires": { "safe-buffer": "^5.0.1" } @@ -4531,9 +4390,9 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" } - "bip66": { } }, + "bip66": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/bip66/-/bip66-1.1.5.tgz", "integrity": "sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI=", @@ -4584,8 +4443,8 @@ "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" } - "blakejs": { }, + "blakejs": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.1.0.tgz", "integrity": "sha1-ad+S75U6qIylGjLfarHFShVfx6U=" @@ -4867,14 +4726,14 @@ } }, "browserslist": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.7.0.tgz", - "integrity": "sha512-9rGNDtnj+HaahxiVV38Gn8n8Lr8REKsel68v1sPFfIGEK6uSXTY3h9acgiT1dZVtOOUtifo/Dn8daDQ5dUgVsA==", + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.6.tgz", + "integrity": "sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000989", - "electron-to-chromium": "^1.3.247", - "node-releases": "^1.1.29" + "caniuse-lite": "^1.0.30000984", + "electron-to-chromium": "^1.3.191", + "node-releases": "^1.1.25" } }, "bs58": { @@ -4956,8 +4815,7 @@ "buffer-indexof": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz", - "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==", - "dev": true + "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g==" }, "buffer-peek-stream": { "version": "1.0.1", @@ -5188,9 +5046,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000989", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000989.tgz", - "integrity": "sha512-vrMcvSuMz16YY6GSVZ0dWDTJP8jqk3iFQ/Aq5iqblPwxSVVZI+zxDyTX0VPqtQsDnfdrBDcsmhgTEOh5R8Lbpw==", + "version": "1.0.30000986", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000986.tgz", + "integrity": "sha512-pM+LnkoAX0+QnIH3tpW5EnkmfpEoqOD8FAcoBvsl3Xh6DXkgctiCxeCbXphP/k3XJtJzm+zOAJbi6U6IVkpWZQ==", "dev": true }, "capture-exit": { @@ -5777,22 +5635,12 @@ "unique-string": "^1.0.0", "write-file-atomic": "^2.0.0", "xdg-basedir": "^3.0.0" - }, - "dependencies": { - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "requires": { - "is-obj": "^1.0.0" - } - } } }, "confusing-browser-globals": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.8.tgz", - "integrity": "sha512-lI7asCibVJ6Qd3FGU7mu4sfG4try4LX3+GVS+Gv8UlrEf2AeW57piecapnog2UHZSbcX/P/1UDWVaTsblowlZg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.7.tgz", + "integrity": "sha512-cgHI1azax5ATrZ8rJ+ODDML9Fvu67PimB6aNxBrc/QwSaDaM9eTfIEUHx3bBLJJ82ioSb+/5zfsMCCEJax3ByQ==", "dev": true }, "connect-history-api-fallback": { @@ -5912,13 +5760,14 @@ "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" }, "core-js-compat": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.2.1.tgz", - "integrity": "sha512-MwPZle5CF9dEaMYdDeWm73ao/IflDH+FjeJCWEADcEgFSE9TLimFKwJsfmkwzI8eC0Aj0mgvMDjeQjrElkz4/A==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.1.4.tgz", + "integrity": "sha512-Z5zbO9f1d0YrJdoaQhphVAnKPimX92D6z8lCGphH89MNRxlL1prI9ExJPqVwP0/kgkQCv8c4GJGT8X16yUncOg==", "dev": true, "requires": { - "browserslist": "^4.6.6", - "semver": "^6.3.0" + "browserslist": "^4.6.2", + "core-js-pure": "3.1.4", + "semver": "^6.1.1" }, "dependencies": { "semver": { @@ -6424,9 +6273,9 @@ } }, "datastore-fs": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/datastore-fs/-/datastore-fs-0.8.0.tgz", - "integrity": "sha512-uaNVJtMQKNxxJkqKGrI5dYhciUIZSntHVCS3pU4qimke8tSp9pCkXwgLoxORxX1z411sF1Im5cc9RlnJT7NOMg==", + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/datastore-fs/-/datastore-fs-0.8.1.tgz", + "integrity": "sha512-kSWQwTWa7Pf6HIBvJVQ0b8BvKqW6y22zWJ1Vp0h34R5loq48hOYQ++4ckZFWyzOvF3bJAi5X2euF01RPKqMJIQ==", "requires": { "async": "^2.6.1", "datastore-core": "~0.6.0", @@ -6618,18 +6467,10 @@ } }, "deep-equal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.0.tgz", - "integrity": "sha512-ZbfWJq/wN1Z273o7mUSjILYqehAktR2NVoSrOukDkU9kg2v/Uv89yU4Cvz8seJeAmtN5oqiefKq8FPuXOboqLw==", - "dev": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", + "dev": true }, "deep-extend": { "version": "0.6.0", @@ -6678,23 +6519,12 @@ "integrity": "sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==" }, "deferred-leveldown": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.1.0.tgz", - "integrity": "sha512-PvDY+BT2ONu2XVRgxHb77hYelLtMYxKSGuWuJJdVRXh9ntqx9GYTFJno/SKAz5xcd+yjQwyQeIZrUPjPvA52mg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.2.0.tgz", + "integrity": "sha512-E1s224a+nv7nEZQL/s+q4ARzBhsfo3KiEjK3qdvDAvMfWE68GnGsMRYKanoZgYqq+LNgyRMYPzBgEmAXjM2i5g==", "requires": { - "abstract-leveldown": "~6.0.0", + "abstract-leveldown": "~6.1.0", "inherits": "^2.0.3" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz", - "integrity": "sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q==", - "requires": { - "level-concat-iterator": "~2.0.0", - "xtend": "~4.0.0" - } - } } }, "define-properties": { @@ -7097,9 +6927,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.252", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.252.tgz", - "integrity": "sha512-NWJ5TztDnjExFISZHFwpoJjMbLUifsNBnx7u2JI0gCw6SbKyQYYWWtBHasO/jPtHym69F4EZuTpRNGN11MT/jg==", + "version": "1.3.203", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.203.tgz", + "integrity": "sha512-Z1FjJKEBhYrCNmnususVk8khiBabVI/bSJB/295V4ghVt4MFmtbP+mXgRZLQZinEBI469U6FtiGgpXnlLs6qiQ==", "dev": true }, "elliptic": { @@ -7141,11 +6971,11 @@ } }, "encoding-down": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.1.0.tgz", - "integrity": "sha512-pBW1mbuQDHQhQLBtqarX8x2oLynahiOzBY5L/BosNqcstJ8MjpSc3rx1yCUIqb6bUE2vsp3t0BaXS0ZDP1s5pg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.2.0.tgz", + "integrity": "sha512-XlIoQMBMbU4aE01uSKpAix0sXBJWK8YPhuOdvKa1CroThZyUpj0zWzt+bbe7g1KWsdhNFFzHkQHSdDymVtpJ1w==", "requires": { - "abstract-leveldown": "^6.0.0", + "abstract-leveldown": "^6.1.1", "inherits": "^2.0.3", "level-codec": "^9.0.0", "level-errors": "^2.0.0" @@ -7377,9 +7207,9 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escodegen": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz", - "integrity": "sha512-TuA+EhsanGcme5T3R0L80u4t8CpbXQjegRmf7+FPTJrtCTErXFeelblRgHQa1FofEzqYYJmJ/OqjTwREp9qgmg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", + "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", "dev": true, "requires": { "esprima": "^3.1.3", @@ -7790,9 +7620,9 @@ } }, "eslint-plugin-react-hooks": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz", - "integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.6.1.tgz", + "integrity": "sha512-wHhmGJyVuijnYIJXZJHDUF2WM+rJYTjulUTqF9k61d3BTk8etydz+M4dXUVH7M76ZRS85rqBTCx0Es/lLsrjnA==", "dev": true }, "eslint-scope": { @@ -7815,9 +7645,9 @@ } }, "eslint-visitor-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", - "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, "espree": { @@ -7856,15 +7686,15 @@ } }, "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", "dev": true }, "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", + "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, "etag": { @@ -8295,93 +8125,17 @@ } }, "expect": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", - "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.8.0.tgz", + "integrity": "sha512-/zYvP8iMDrzaaxHVa724eJBCKqSHmO0FA7EDkBiRHxg6OipmMn1fN+C8T9L9K8yr7UONkOifu6+LLH+z76CnaA==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "ansi-styles": "^3.2.0", - "jest-get-type": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-regex-util": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "diff-sequences": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", - "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", - "dev": true - }, - "jest-diff": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", - "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - } - }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, - "jest-matcher-utils": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", - "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - } - }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - } - } + "jest-get-type": "^24.8.0", + "jest-matcher-utils": "^24.8.0", + "jest-message-util": "^24.8.0", + "jest-regex-util": "^24.3.0" } }, "explain-error": { @@ -8846,7 +8600,6 @@ "readable-stream": "^2.3.6" } "fnv1a": { - }, "version": "1.0.1", "resolved": "https://registry.npmjs.org/fnv1a/-/fnv1a-1.0.1.tgz", "integrity": "sha1-kV4tbQI8Q9UiStn20qPEFW9XEvU=" @@ -8896,9 +8649,9 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "fork-ts-checker-webpack-plugin": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.5.0.tgz", - "integrity": "sha512-zEhg7Hz+KhZlBhILYpXy+Beu96gwvkROWJiTXOCyOOMMrdBIRPvsBpBqgTI4jfJGrJXcqGwJR8zsBGDmzY0jsA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-1.1.1.tgz", + "integrity": "sha512-gqWAEMLlae/oeVnN6RWCAhesOJMswAN1MaKNqhhjXHV5O0/rTUjWI4UbgQHdlrVbCnb+xLotXmJbBlC66QmpFw==", "dev": true, "requires": { "babel-code-frame": "^6.22.0", @@ -9020,22 +8773,26 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "optional": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "optional": true, "requires": { "delegates": "^1.0.0", @@ -9044,12 +8801,14 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "optional": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -9058,32 +8817,38 @@ }, "chownr": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "optional": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "optional": true }, "debug": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "optional": true, "requires": { "ms": "^2.1.1" @@ -9091,22 +8856,26 @@ }, "deep-extend": { "version": "0.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "optional": true, "requires": { "minipass": "^2.2.1" @@ -9114,12 +8883,14 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "optional": true, "requires": { "aproba": "^1.0.3", @@ -9134,7 +8905,8 @@ }, "glob": { "version": "7.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -9147,12 +8919,14 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "optional": true }, "iconv-lite": { "version": "0.4.24", - "bundled": true, + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -9160,7 +8934,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "optional": true, "requires": { "minimatch": "^3.0.4" @@ -9168,7 +8943,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "optional": true, "requires": { "once": "^1.3.0", @@ -9177,17 +8953,20 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "optional": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -9195,12 +8974,14 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "optional": true, "requires": { "brace-expansion": "^1.1.7" @@ -9208,12 +8989,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "optional": true }, "minipass": { "version": "2.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -9222,7 +9005,8 @@ }, "minizlib": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "optional": true, "requires": { "minipass": "^2.2.1" @@ -9230,7 +9014,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "optional": true, "requires": { "minimist": "0.0.8" @@ -9238,12 +9023,14 @@ }, "ms": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "optional": true }, "needle": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "optional": true, "requires": { "debug": "^4.1.0", @@ -9253,7 +9040,8 @@ }, "node-pre-gyp": { "version": "0.12.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "optional": true, "requires": { "detect-libc": "^1.0.2", @@ -9270,7 +9058,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "optional": true, "requires": { "abbrev": "1", @@ -9279,12 +9068,14 @@ }, "npm-bundled": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "optional": true }, "npm-packlist": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -9293,7 +9084,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -9304,17 +9096,20 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "optional": true, "requires": { "wrappy": "1" @@ -9322,17 +9117,20 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -9341,17 +9139,20 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "optional": true }, "rc": { "version": "1.2.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "optional": true, "requires": { "deep-extend": "^0.6.0", @@ -9362,14 +9163,16 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "optional": true } } }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -9383,7 +9186,8 @@ }, "rimraf": { "version": "2.6.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "optional": true, "requires": { "glob": "^7.1.3" @@ -9391,37 +9195,44 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "optional": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "optional": true }, "semver": { "version": "5.7.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -9431,7 +9242,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -9439,7 +9251,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -9447,12 +9260,14 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "optional": true }, "tar": { "version": "4.4.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "optional": true, "requires": { "chownr": "^1.1.1", @@ -9466,12 +9281,14 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "optional": true }, "wide-align": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -9479,12 +9296,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "optional": true } } @@ -10204,6 +10023,16 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "globalthis": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.0.tgz", + "integrity": "sha512-vcCAZTJ3r5Qcu5l8/2oyVdoFwxKgfYnMTR2vwWeux/NAVZK3PwcMaWkdUIn4GJbmKuRK7xcvDsLuK+CKcXyodg==", + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "object-keys": "^1.0.12" + } + }, "globby": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/globby/-/globby-8.0.2.tgz", @@ -10347,19 +10176,19 @@ } }, "gzip-size": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", - "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz", + "integrity": "sha512-5iI7omclyqrnWw4XbXAmGhPsABkSIDQonv2K0h61lybgofWa6iZyvrI3r2zsJH4P8Nb64fFVzlvfhs0g7BBxAA==", "dev": true, "requires": { "duplexer": "^0.1.1", - "pify": "^4.0.1" + "pify": "^3.0.0" }, "dependencies": { "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true } } @@ -10379,9 +10208,9 @@ "dev": true }, "handlebars": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.0.tgz", - "integrity": "sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", + "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -10410,9 +10239,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.2.tgz", - "integrity": "sha512-18P3VwngjNEcmvPj1mmiHLPyUPjhPAxIyJKDj4PRIY0F5ac3P0Vd0hkASPyWXHK0rfY3P9N2FoxV8ZuYaRBZ1g==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", + "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" } } }, @@ -11016,9 +10845,9 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", - "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", + "integrity": "sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==", "dev": true, "requires": { "ansi-escapes": "^3.2.0", @@ -11930,9 +11759,9 @@ } }, "ipfs-mfs": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/ipfs-mfs/-/ipfs-mfs-0.12.1.tgz", - "integrity": "sha512-TyxmsCvp5XVoy2lczAxbCKmpQaXlk/NQRemCNxJBcX+anFrUWx1YTq49HfXu0squ5SMfy51Nd/X4LF0nP1VPKg==", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/ipfs-mfs/-/ipfs-mfs-0.12.2.tgz", + "integrity": "sha512-o9vGKEdUI4HwQV67DQnC1AVSSs7i/yaIHrKPEb6Oe6vGeobLGuEGMReWjTcnMi5KAKUECFESEVtDuNJDr8BW5Q==", "requires": { "@hapi/boom": "^7.4.2", "@hapi/joi": "^15.1.0", @@ -11942,13 +11771,13 @@ "err-code": "^1.1.2", "hamt-sharding": "~0.0.2", "interface-datastore": "~0.6.0", - "ipfs-multipart": "~0.1.0", + "ipfs-multipart": "~0.2.0", "ipfs-unixfs": "~0.1.16", "ipfs-unixfs-exporter": "~0.37.6", "ipfs-unixfs-importer": "~0.39.9", "ipld-dag-pb": "~0.17.2", "joi-browser": "^13.4.0", - "mortice": "^1.2.1", + "mortice": "^2.0.0", "multicodec": "~0.5.3", "multihashes": "~0.4.14", "once": "^1.4.0", @@ -11969,6 +11798,15 @@ "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" }, + "ipfs-multipart": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.2.0.tgz", + "integrity": "sha512-pDCr7xtOW7KCqgeGmejfWjm5xPH516Kx4OU/PdbtIZu68/cFPW4jftJy9idQHdf0C/NnKHnqntMY93rbc+qrQg==", + "requires": { + "@hapi/content": "^4.1.0", + "it-multipart": "~0.0.2" + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -12520,11 +12358,6 @@ "is-decimal": "^1.0.0" } "is-arguments": { - }, - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", - "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", - "dev": true }, "is-arrayish": { "version": "0.2.1", @@ -12872,9 +12705,9 @@ "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=" }, "is-root": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz", - "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.0.0.tgz", + "integrity": "sha512-F/pJIk8QD6OX5DNhRB7hWamLsUilmkDGho48KbgZ6xg/lmAZXHxzXQ91jzB3yRSw5kdQGGGc4yz8HYhTYIMWPg==", "dev": true }, "is-stream": { @@ -13194,6 +13027,15 @@ } } }, + "it-multipart": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/it-multipart/-/it-multipart-0.0.2.tgz", + "integrity": "sha512-Mlvf1Tt+gLyk5EkE9njjfDCuvf5+3rx1vDt271MT7Ye08/3yJL/h+M/EWhPBPLebmNrkfXUQOGl8ud4T9PzuWA==", + "requires": { + "buffer-indexof": "^1.1.1", + "parse-headers": "^2.0.2" + } + }, "it-to-stream": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-0.1.1.tgz", @@ -13252,30 +13094,10 @@ "jest-cli": "^24.7.1" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "camelcase": { @@ -13285,14 +13107,14 @@ "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "find-up": { @@ -13304,10 +13126,10 @@ "locate-path": "^3.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, "is-fullwidth-code-point": { @@ -13317,50 +13139,63 @@ "dev": true }, "jest-cli": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", - "integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.8.0.tgz", + "integrity": "sha512-+p6J00jSMPQ116ZLlHJJvdf8wbjNbZdeSX9ptfHX06/MSNaXmKihQzx5vQcw0q2G6JsdVkUIdWbOWtSnaYs3yA==", "dev": true, "requires": { - "@jest/core": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/core": "^24.8.0", + "@jest/test-result": "^24.8.0", + "@jest/types": "^24.8.0", "chalk": "^2.0.1", "exit": "^0.1.2", "import-local": "^2.0.0", "is-ci": "^2.0.0", - "jest-config": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", + "jest-config": "^24.8.0", + "jest-util": "^24.8.0", + "jest-validate": "^24.8.0", "prompts": "^2.0.1", "realpath-native": "^1.1.0", - "yargs": "^13.3.0" + "yargs": "^12.0.2" } }, - "require-main-filename": { + "lcid": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "strip-ansi": "^4.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^3.0.0" } }, "which-module": { @@ -13369,45 +13204,30 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "dev": true, "requires": { - "cliui": "^5.0.0", + "cliui": "^4.0.0", + "decamelize": "^1.2.0", "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", + "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^2.0.0", "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -13417,134 +13237,53 @@ } }, "jest-changed-files": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", - "integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.8.0.tgz", + "integrity": "sha512-qgANC1Yrivsq+UrLXsvJefBKVoCsKB0Hv+mBb6NMjjZ90wwxCDmU3hsCXBya30cH+LnPYjwgcU65i6yJ5Nfuug==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "execa": "^1.0.0", "throat": "^4.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } } }, "jest-config": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", - "integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.8.0.tgz", + "integrity": "sha512-Czl3Nn2uEzVGsOeaewGWoDPD8GStxCpAe0zOYs2x2l0fZAgPbCr3uwUkgNKV3LwE13VXythM946cd5rdGkkBZw==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/test-sequencer": "^24.9.0", - "@jest/types": "^24.9.0", - "babel-jest": "^24.9.0", + "@jest/test-sequencer": "^24.8.0", + "@jest/types": "^24.8.0", + "babel-jest": "^24.8.0", "chalk": "^2.0.1", "glob": "^7.1.1", - "jest-environment-jsdom": "^24.9.0", - "jest-environment-node": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-jasmine2": "^24.9.0", + "jest-environment-jsdom": "^24.8.0", + "jest-environment-node": "^24.8.0", + "jest-get-type": "^24.8.0", + "jest-jasmine2": "^24.8.0", "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", + "jest-resolve": "^24.8.0", + "jest-util": "^24.8.0", + "jest-validate": "^24.8.0", "micromatch": "^3.1.10", - "pretty-format": "^24.9.0", + "pretty-format": "^24.8.0", "realpath-native": "^1.1.0" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "babel-jest": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-24.9.0.tgz", - "integrity": "sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw==", - "dev": true, - "requires": { - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/babel__core": "^7.1.0", - "babel-plugin-istanbul": "^5.1.0", - "babel-preset-jest": "^24.9.0", - "chalk": "^2.4.2", - "slash": "^2.0.0" - } - }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.8.0.tgz", + "integrity": "sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "jest-pnp-resolver": "^1.2.1", "realpath-native": "^1.1.0" } - }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - } } } }, @@ -13561,107 +13300,39 @@ } }, "jest-docblock": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", - "integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.3.0.tgz", + "integrity": "sha512-nlANmF9Yq1dufhFlKG9rasfQlrY7wINJbo3q01tu56Jv5eBU5jirylhF2O5ZBnLxzOVBGRDz/9NAwNyBtG4Nyg==", "dev": true, "requires": { "detect-newline": "^2.1.0" } }, "jest-each": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", - "integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.8.0.tgz", + "integrity": "sha512-NrwK9gaL5+XgrgoCsd9svsoWdVkK4gnvyhcpzd6m487tXHqIdYeykgq3MKI1u4I+5Zf0tofr70at9dWJDeb+BA==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - } - } + "jest-get-type": "^24.8.0", + "jest-util": "^24.8.0", + "pretty-format": "^24.8.0" } }, "jest-environment-jsdom": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", - "integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.8.0.tgz", + "integrity": "sha512-qbvgLmR7PpwjoFjM/sbuqHJt/NCkviuq9vus9NBn/76hhSidO+Z6Bn9tU8friecegbJL8gzZQEMZBQlFWDCwAQ==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0", + "@jest/environment": "^24.8.0", + "@jest/fake-timers": "^24.8.0", + "@jest/types": "^24.8.0", + "jest-mock": "^24.8.0", + "jest-util": "^24.8.0", "jsdom": "^11.5.1" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } } }, "jest-environment-jsdom-fourteen": { @@ -13737,38 +13408,16 @@ } }, "jest-environment-node": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", - "integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.8.0.tgz", + "integrity": "sha512-vIGUEScd1cdDgR6sqn2M08sJTRLQp6Dk/eIkCeO4PFHxZMOgy+uYLPMC4ix3PEfM5Au/x3uQ/5Tl0DpXXZsJ/Q==", "dev": true, "requires": { - "@jest/environment": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/types": "^24.9.0", - "jest-mock": "^24.9.0", - "jest-util": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } + "@jest/environment": "^24.8.0", + "@jest/fake-timers": "^24.8.0", + "@jest/types": "^24.8.0", + "jest-mock": "^24.8.0", + "jest-util": "^24.8.0" } }, "jest-get-type": { @@ -13778,201 +13427,56 @@ "dev": true }, "jest-haste-map": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.9.0.tgz", - "integrity": "sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ==", + "version": "24.8.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-24.8.1.tgz", + "integrity": "sha512-SwaxMGVdAZk3ernAx2Uv2sorA7jm3Kx+lR0grp6rMmnY06Kn/urtKx1LPN2mGTea4fCT38impYT28FfcLUhX0g==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "anymatch": "^2.0.0", "fb-watchman": "^2.0.0", "fsevents": "^1.2.7", "graceful-fs": "^4.1.15", "invariant": "^2.2.4", - "jest-serializer": "^24.9.0", - "jest-util": "^24.9.0", - "jest-worker": "^24.9.0", + "jest-serializer": "^24.4.0", + "jest-util": "^24.8.0", + "jest-worker": "^24.6.0", "micromatch": "^3.1.10", "sane": "^4.0.3", "walker": "^1.0.7" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } } }, "jest-jasmine2": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", - "integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.8.0.tgz", + "integrity": "sha512-cEky88npEE5LKd5jPpTdDCLvKkdyklnaRycBXL6GNmpxe41F0WN44+i7lpQKa/hcbXaQ+rc9RMaM4dsebrYong==", "dev": true, "requires": { "@babel/traverse": "^7.1.0", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/environment": "^24.8.0", + "@jest/test-result": "^24.8.0", + "@jest/types": "^24.8.0", "chalk": "^2.0.1", "co": "^4.6.0", - "expect": "^24.9.0", + "expect": "^24.8.0", "is-generator-fn": "^2.0.0", - "jest-each": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "pretty-format": "^24.9.0", + "jest-each": "^24.8.0", + "jest-matcher-utils": "^24.8.0", + "jest-message-util": "^24.8.0", + "jest-runtime": "^24.8.0", + "jest-snapshot": "^24.8.0", + "jest-util": "^24.8.0", + "pretty-format": "^24.8.0", "throat": "^4.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "diff-sequences": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", - "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", - "dev": true - }, - "jest-diff": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", - "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - } - }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, - "jest-matcher-utils": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", - "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - } - }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - } - } } }, "jest-leak-detector": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", - "integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.8.0.tgz", + "integrity": "sha512-cG0yRSK8A831LN8lIHxI3AblB40uhv0z+SsQdW3GoMMVcK+sJwrIIyax5tu3eHHNJ8Fu6IMDpnLda2jhn2pD/g==", "dev": true, "requires": { - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - } - } + "pretty-format": "^24.8.0" } }, "jest-matcher-utils": { @@ -13988,72 +13492,28 @@ } }, "jest-message-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", - "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.8.0.tgz", + "integrity": "sha512-p2k71rf/b6ns8btdB0uVdljWo9h0ovpnEe05ZKWceQGfXYr4KkzgKo3PBi8wdnd9OtNh46VpNIJynUn/3MKm1g==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/test-result": "^24.8.0", + "@jest/types": "^24.8.0", "@types/stack-utils": "^1.0.1", "chalk": "^2.0.1", "micromatch": "^3.1.10", "slash": "^2.0.0", "stack-utils": "^1.0.1" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } } }, "jest-mock": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.9.0.tgz", - "integrity": "sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-24.8.0.tgz", + "integrity": "sha512-6kWugwjGjJw+ZkK4mDa0Df3sDlUTsV47MSrT0nGQ0RBWJbpODDQ8MHDVtGtUYBne3IwZUhtB7elxHspU79WH3A==", "dev": true, "requires": { - "@jest/types": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } + "@jest/types": "^24.8.0" } }, "jest-mock-axios": { @@ -14072,9 +13532,9 @@ "dev": true }, "jest-regex-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", - "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.3.0.tgz", + "integrity": "sha512-tXQR1NEOyGlfylyEjg1ImtScwMq8Oh3iJbGTjN7p0J23EuVX1MA8rwU69K4sLbCmwzgCUbVkm0FkSF9TdzOhtg==", "dev": true }, "jest-resolve": { @@ -14091,92 +13551,50 @@ } }, "jest-resolve-dependencies": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", - "integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.8.0.tgz", + "integrity": "sha512-hyK1qfIf/krV+fSNyhyJeq3elVMhK9Eijlwy+j5jqmZ9QsxwKBiP6qukQxaHtK8k6zql/KYWwCTQ+fDGTIJauw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "jest-regex-util": "^24.3.0", - "jest-snapshot": "^24.9.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } + "jest-snapshot": "^24.8.0" } }, "jest-runner": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", - "integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.8.0.tgz", + "integrity": "sha512-utFqC5BaA3JmznbissSs95X1ZF+d+4WuOWwpM9+Ak356YtMhHE/GXUondZdcyAAOTBEsRGAgH/0TwLzfI9h7ow==", "dev": true, "requires": { "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/environment": "^24.8.0", + "@jest/test-result": "^24.8.0", + "@jest/types": "^24.8.0", "chalk": "^2.4.2", "exit": "^0.1.2", "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", + "jest-config": "^24.8.0", "jest-docblock": "^24.3.0", - "jest-haste-map": "^24.9.0", - "jest-jasmine2": "^24.9.0", - "jest-leak-detector": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", - "jest-runtime": "^24.9.0", - "jest-util": "^24.9.0", + "jest-haste-map": "^24.8.0", + "jest-jasmine2": "^24.8.0", + "jest-leak-detector": "^24.8.0", + "jest-message-util": "^24.8.0", + "jest-resolve": "^24.8.0", + "jest-runtime": "^24.8.0", + "jest-util": "^24.8.0", "jest-worker": "^24.6.0", "source-map-support": "^0.5.6", "throat": "^4.0.0" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.8.0.tgz", + "integrity": "sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "jest-pnp-resolver": "^1.2.1", @@ -14186,60 +13604,40 @@ } }, "jest-runtime": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", - "integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.8.0.tgz", + "integrity": "sha512-Mq0aIXhvO/3bX44ccT+czU1/57IgOMyy80oM0XR/nyD5zgBcesF84BPabZi39pJVA6UXw+fY2Q1N+4BiVUBWOA==", "dev": true, "requires": { "@jest/console": "^24.7.1", - "@jest/environment": "^24.9.0", + "@jest/environment": "^24.8.0", "@jest/source-map": "^24.3.0", - "@jest/transform": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", + "@jest/transform": "^24.8.0", + "@jest/types": "^24.8.0", + "@types/yargs": "^12.0.2", "chalk": "^2.0.1", "exit": "^0.1.2", "glob": "^7.1.3", "graceful-fs": "^4.1.15", - "jest-config": "^24.9.0", - "jest-haste-map": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-mock": "^24.9.0", + "jest-config": "^24.8.0", + "jest-haste-map": "^24.8.0", + "jest-message-util": "^24.8.0", + "jest-mock": "^24.8.0", "jest-regex-util": "^24.3.0", - "jest-resolve": "^24.9.0", - "jest-snapshot": "^24.9.0", - "jest-util": "^24.9.0", - "jest-validate": "^24.9.0", + "jest-resolve": "^24.8.0", + "jest-snapshot": "^24.8.0", + "jest-util": "^24.8.0", + "jest-validate": "^24.8.0", "realpath-native": "^1.1.0", "slash": "^2.0.0", "strip-bom": "^3.0.0", - "yargs": "^13.3.0" + "yargs": "^12.0.2" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, "camelcase": { @@ -14249,14 +13647,14 @@ "dev": true }, "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", "dev": true, "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" } }, "find-up": { @@ -14268,10 +13666,10 @@ "locate-path": "^3.0.0" } }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, "is-fullwidth-code-point": { @@ -14281,42 +13679,55 @@ "dev": true }, "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.8.0.tgz", + "integrity": "sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "jest-pnp-resolver": "^1.2.1", "realpath-native": "^1.1.0" } }, - "require-main-filename": { + "lcid": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - "string-width": { - }, - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "strip-ansi": "^4.0.0" } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^3.0.0" } }, "strip-bom": { @@ -14331,45 +13742,30 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - } - }, - "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", - "dev": true - }, "yargs": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", - "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "version": "12.0.5", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", + "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", "dev": true, "requires": { - "cliui": "^5.0.0", + "cliui": "^4.0.0", + "decamelize": "^1.2.0", "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", + "get-caller-file": "^1.0.1", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", + "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", - "string-width": "^3.0.0", + "string-width": "^2.0.0", "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "y18n": "^3.2.1 || ^4.0.0", + "yargs-parser": "^11.1.1" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", + "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -14379,138 +13775,57 @@ } }, "jest-serializer": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", - "integrity": "sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ==", + "version": "24.4.0", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.4.0.tgz", + "integrity": "sha512-k//0DtglVstc1fv+GY/VHDIjrtNjdYvYjMlbLUed4kxrE92sIUewOi5Hj3vrpB8CXfkJntRPDRjCrCvUhBdL8Q==", "dev": true }, "jest-snapshot": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", - "integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.8.0.tgz", + "integrity": "sha512-5ehtWoc8oU9/cAPe6fez6QofVJLBKyqkY2+TlKTOf0VllBB/mqUNdARdcjlZrs9F1Cv+/HKoCS/BknT0+tmfPg==", "dev": true, "requires": { "@babel/types": "^7.0.0", - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "chalk": "^2.0.1", - "expect": "^24.9.0", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "jest-matcher-utils": "^24.9.0", - "jest-message-util": "^24.9.0", - "jest-resolve": "^24.9.0", + "expect": "^24.8.0", + "jest-diff": "^24.8.0", + "jest-matcher-utils": "^24.8.0", + "jest-message-util": "^24.8.0", + "jest-resolve": "^24.8.0", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "pretty-format": "^24.9.0", - "semver": "^6.2.0" + "pretty-format": "^24.8.0", + "semver": "^5.5.0" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, - "diff-sequences": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", - "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", - "dev": true - }, - "jest-diff": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", - "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "diff-sequences": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - } - }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, - "jest-matcher-utils": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", - "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", - "dev": true, - "requires": { - "chalk": "^2.0.1", - "jest-diff": "^24.9.0", - "jest-get-type": "^24.9.0", - "pretty-format": "^24.9.0" - } - }, "jest-resolve": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.9.0.tgz", - "integrity": "sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-24.8.0.tgz", + "integrity": "sha512-+hjSzi1PoRvnuOICoYd5V/KpIQmkAsfjFO71458hQ2Whi/yf1GDeBOFj8Gxw4LrApHsVJvn5fmjcPdmoUHaVKw==", "dev": true, "requires": { - "@jest/types": "^24.9.0", + "@jest/types": "^24.8.0", "browser-resolve": "^1.11.3", "chalk": "^2.0.1", "jest-pnp-resolver": "^1.2.1", "realpath-native": "^1.1.0" } - }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true } } }, "jest-util": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.9.0.tgz", - "integrity": "sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-24.8.0.tgz", + "integrity": "sha512-DYZeE+XyAnbNt0BG1OQqKy/4GVLPtzwGx5tsnDrFcax36rVE3lTA5fbvgmbVPUZf9w77AJ8otqR4VBbfFJkUZA==", "dev": true, "requires": { - "@jest/console": "^24.9.0", - "@jest/fake-timers": "^24.9.0", - "@jest/source-map": "^24.9.0", - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", + "@jest/console": "^24.7.1", + "@jest/fake-timers": "^24.8.0", + "@jest/source-map": "^24.3.0", + "@jest/test-result": "^24.8.0", + "@jest/types": "^24.8.0", "callsites": "^3.0.0", "chalk": "^2.0.1", "graceful-fs": "^4.1.15", @@ -14520,26 +13835,6 @@ "source-map": "^0.6.0" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -14555,74 +13850,24 @@ } }, "jest-validate": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", - "integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.8.0.tgz", + "integrity": "sha512-+/N7VOEMW1Vzsrk3UWBDYTExTPwf68tavEPKDnJzrC6UlHtUDU/fuEdXqFoHzv9XnQ+zW6X3qMZhJ3YexfeLDA==", "dev": true, "requires": { - "@jest/types": "^24.9.0", - "camelcase": "^5.3.1", + "@jest/types": "^24.8.0", + "camelcase": "^5.0.0", "chalk": "^2.0.1", - "jest-get-type": "^24.9.0", - "leven": "^3.1.0", - "pretty-format": "^24.9.0" + "jest-get-type": "^24.8.0", + "leven": "^2.1.0", + "pretty-format": "^24.8.0" }, "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - }, - "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true - }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true - }, - "jest-get-type": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", - "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", - "dev": true - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "pretty-format": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", - "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", - "dev": true, - "requires": { - "@jest/types": "^24.9.0", - "ansi-regex": "^4.0.0", - "ansi-styles": "^3.2.0", - "react-is": "^16.8.4" - } } } }, @@ -14658,49 +13903,27 @@ } }, "jest-watcher": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.9.0.tgz", - "integrity": "sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw==", + "version": "24.8.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-24.8.0.tgz", + "integrity": "sha512-SBjwHt5NedQoVu54M5GEx7cl7IGEFFznvd/HNT8ier7cCAx/Qgu9ZMlaTQkvK22G1YOpcWBLQPFSImmxdn3DAw==", "dev": true, "requires": { - "@jest/test-result": "^24.9.0", - "@jest/types": "^24.9.0", - "@types/yargs": "^13.0.0", + "@jest/test-result": "^24.8.0", + "@jest/types": "^24.8.0", + "@types/yargs": "^12.0.9", "ansi-escapes": "^3.0.0", "chalk": "^2.0.1", - "jest-util": "^24.9.0", + "jest-util": "^24.8.0", "string-length": "^2.0.0" - }, - "dependencies": { - "@jest/types": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", - "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", - "dev": true, - "requires": { - "@types/istanbul-lib-coverage": "^2.0.0", - "@types/istanbul-reports": "^1.1.1", - "@types/yargs": "^13.0.0" - } - }, - "@types/yargs": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.2.tgz", - "integrity": "sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ==", - "dev": true, - "requires": { - "@types/yargs-parser": "*" - } - } } }, "jest-worker": { - "version": "24.9.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz", - "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==", + "version": "24.6.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.6.0.tgz", + "integrity": "sha512-jDwgW5W9qGNvpI1tNnvajh0a5IE/PuGLFmHk6aR/BZFz8tSgGw17GsDPXAJ6p91IvYDjOw8GpFbvvZGAK+DPQQ==", "dev": true, "requires": { - "merge-stream": "^2.0.0", + "merge-stream": "^1.0.1", "supports-color": "^6.1.0" }, "dependencies": { @@ -15331,32 +14554,21 @@ } }, "leveldown": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.1.1.tgz", - "integrity": "sha512-4n2R/vEA/sssh5TKtFwM9gshW2tirNoURLqekLRUUzuF+eUBLFAufO8UW7bz8lBbG2jw8tQDF3LC+LcUCc12kg==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.2.0.tgz", + "integrity": "sha512-Ml6mWFqhhyUbuJUVaOd6ZVBHA5T0XLOK0cwNRIBEDJCjBiJBM3fpi4gdTIhU5/tWqtxMFMQbmo/U7a9rbA1stg==", "requires": { - "abstract-leveldown": "~6.0.3", - "napi-macros": "~1.8.1", + "abstract-leveldown": "~6.1.1", + "napi-macros": "~2.0.0", "node-gyp-build": "~4.1.0" - }, - "dependencies": { - "abstract-leveldown": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.0.3.tgz", - "integrity": "sha512-jzewKKpZbaYUa6HTThnrl+GrJhzjEAeuc7hTVpZdzg7kupXZFoqQDFwyOwLNbmJKJlmzw8yiipMPkDiuKkT06Q==", - "requires": { - "level-concat-iterator": "~2.0.0", - "xtend": "~4.0.0" - } - } } }, "levelup": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.1.0.tgz", - "integrity": "sha512-+Qhe2/jb5affN7BeFgWUUWVdYoGXO2nFS3QLEZKZynnQyP9xqA+7wgOz3fD8SST2UKpHQuZgjyJjTcB2nMl2dQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.2.0.tgz", + "integrity": "sha512-TiHUSYrSUQhG7a5MZIKq6ClDcARSvMvSy5GTM8I62tHV5XiWqf+aInF+CAenQKzVRG2s6fufg62Lv8614Extyg==", "requires": { - "deferred-leveldown": "~5.1.0", + "deferred-leveldown": "~5.2.0", "level-errors": "~2.0.0", "level-iterator-stream": "~4.0.0", "xtend": "~4.0.0" @@ -16835,8 +16047,8 @@ "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" } } - "ltgt": { }, + "ltgt": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" @@ -17132,17 +16344,20 @@ "requires": { "is-plain-obj": "^1.1" } - "merge-stream": { }, - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "merge-stream": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz", + "integrity": "sha1-QEEgLVCKNCugAXQAjfDCUbjBNeE=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } }, "merge2": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.4.tgz", - "integrity": "sha512-FYE8xI+6pjFOhokZu0We3S5NKCirLbCzSh2Usf3qEyr4X8U+0jNg9P8RZ4qz+V2UoECLVwSyzU3LxXBaLGtD3A==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.2.3.tgz", + "integrity": "sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==", "dev": true }, "merkle-lib": { @@ -17451,10 +16666,11 @@ "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" }, "mortice": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/mortice/-/mortice-1.2.3.tgz", - "integrity": "sha512-m285eSxSrbNieKgWWzGSbWO2oSoFHb2fdZX306afMVJ8p8boeAmUW5hCyZBC/gHuBMizR7wO9sXH74kZmf0ZbA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mortice/-/mortice-2.0.0.tgz", + "integrity": "sha512-rXcjRgv2MRhpwGHErxKcDcp5IoA9CPvPFLXmmseQYIuQ2fSVu8tsMKi/eYUXzp/HH1s6y3IID/GwRqlSglDdRA==", "requires": { + "globalthis": "^1.0.0", "observable-webworkers": "^1.0.0", "p-queue": "^6.0.0", "promise-timeout": "^1.3.0", @@ -17701,9 +16917,9 @@ } }, "napi-macros": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-1.8.2.tgz", - "integrity": "sha512-Tr0DNY4RzTaBG2W2m3l7ZtFuJChTH6VZhXVhkGGjF/4cZTt+i8GcM9ozD+30Lmr4mDoZ5Xx34t2o4GJqYWDGcg==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", + "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" }, "natural-compare": { "version": "1.4.0", @@ -17807,9 +17023,9 @@ } }, "node-gyp-build": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.0.tgz", - "integrity": "sha512-rGLv++nK20BG8gc0MzzcYe1Nl3p3mtwJ74Q2QD0HTEDKZ6NvOFSelY6s2QBPWIHRR8h7hpad0LiwajfClBJfNg==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz", + "integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==" }, "node-int64": { "version": "0.4.0", @@ -17880,9 +17096,9 @@ "dev": true }, "node-notifier": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", - "integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.0.tgz", + "integrity": "sha512-SUDEb+o71XR5lXSTyivXd9J7fCloE3SyP4lSgt3lU2oSANiox+SxlNRGPjDKrwU1YN3ix2KN/VGGCg0t01rttQ==", "dev": true, "requires": { "growly": "^1.3.0", @@ -17893,9 +17109,9 @@ } }, "node-releases": { - "version": "1.1.29", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.29.tgz", - "integrity": "sha512-R5bDhzh6I+tpi/9i2hrrvGJ3yKPYzlVOORDkXhnZuwi5D3q1I5w4vYy24PJXTcLk9Q0kws9TO77T75bcK8/ysQ==", + "version": "1.1.26", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.26.tgz", + "integrity": "sha512-fZPsuhhUHMTlfkhDLGtfY80DSJTjOcx+qD1j5pqPkuhUHVS7xHZIg9EE4DHK8O3f0zTxXHX5VIkDG8pu98/wfQ==", "dev": true, "requires": { "semver": "^5.3.0" @@ -18306,9 +17522,9 @@ "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==" }, "opn": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", - "integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz", + "integrity": "sha512-YF9MNdVy/0qvJvDtunAOzFw9iasOQHpVthTCvGzxt61Il64AYSGdK+rYwld7NAfk9qJ7dt+hymBNSc9LNYS+Sw==", "dev": true, "requires": { "is-wsl": "^1.1.0" @@ -18729,16 +17945,16 @@ "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", "dev": true - "parseqs": { }, + "parseqs": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz", "integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=", "requires": { "better-assert": "~1.0.0" } - "parseuri": { }, + "parseuri": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz", "integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=", @@ -19090,9 +18306,9 @@ "integrity": "sha512-w010cY1oCUmI+9KwwlWki+r5jxKfTFDVoadl7MSrIujHU5MJ5OR6HTDj6Xo8aoR/QsA56x8jKjA59qGH4ELtrA==" }, "portfinder": { - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.23.tgz", - "integrity": "sha512-B729mL/uLklxtxuiJKfQ84WPxNw5a7Yhx3geQZdcA4GjNjZSTSSMMWyoennMVnTWSmAR0lMdzWYN0JLnHrg1KQ==", + "version": "1.0.21", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.21.tgz", + "integrity": "sha512-ESabpDCzmBS3ekHbmpAIiESq3udRsCBGiBZLsC+HgBKv2ezb0R4oG+7RnYEVZ/ZCfhel5Tx3UzdNWA0Lox2QCA==", "dev": true, "requires": { "async": "^1.5.2", @@ -19561,17 +18777,6 @@ "dot-prop": "^4.1.1", "indexes-of": "^1.0.1", "uniq": "^1.0.1" - }, - "dependencies": { - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - } } } } @@ -19633,17 +18838,6 @@ "dot-prop": "^4.1.1", "indexes-of": "^1.0.1", "uniq": "^1.0.1" - }, - "dependencies": { - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - } } } } @@ -19689,9 +18883,9 @@ } }, "postcss-nesting": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-7.0.1.tgz", - "integrity": "sha512-FrorPb0H3nuVq0Sff7W2rnc3SmIcruVC6YwpcS+k687VxyxO33iE1amna7wHuRVzM8vfiYofXSBHNAZ3QhLvYg==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-7.0.0.tgz", + "integrity": "sha512-WSsbVd5Ampi3Y0nk/SKr5+K34n52PqMqEfswu6RtU4r7wA8vSD+gM8/D9qq4aJkHImwn1+9iEFTbjoWsQeqtaQ==", "dev": true, "requires": { "postcss": "^7.0.2" @@ -20178,13 +19372,13 @@ "integrity": "sha512-N9iVG+CGJsI4b4ZGazjwLnxErD2d9Pe4DPvvXSxYA9tFNu8ymXME4Qs5HIQ0LMJpNM7zj+m0NlNnNeqFpKzqnA==" }, "prompts": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.2.1.tgz", - "integrity": "sha512-VObPvJiWPhpZI6C5m60XOzTfnYg/xc/an+r9VYymj9WJW3B/DIH+REzjpAACPf8brwPeP+7vz3bIim3S+AaMjw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.1.0.tgz", + "integrity": "sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg==", "dev": true, "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.3" + "kleur": "^3.0.2", + "sisteransi": "^1.0.0" } }, "prop-types": { @@ -20694,33 +19888,39 @@ } }, "react-app-polyfill": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.2.tgz", - "integrity": "sha512-yZcpLnIr0FOIzrOOz9JC37NWAWEuCaQWmYn9EWjEzlCW4cOmA5MkT5L3iP8QuUeFnoqVCTJgjIWYbXEJgNXhGA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.1.tgz", + "integrity": "sha512-LbVpT1NdzTdDDs7xEZdebjDrqsvKi5UyVKUQqtTYYNyC1JJYVAwNQWe4ybWvoT2V2WW9PGVO2u5Y6aVj4ER/Ow==", "dev": true, "requires": { - "core-js": "3.1.4", + "core-js": "3.0.1", "object-assign": "4.1.1", - "promise": "8.0.3", + "promise": "8.0.2", "raf": "3.4.1", - "regenerator-runtime": "0.13.3", + "regenerator-runtime": "0.13.2", "whatwg-fetch": "3.0.0" }, "dependencies": { "core-js": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.1.4.tgz", - "integrity": "sha512-YNZN8lt82XIMLnLirj9MhKDFZHalwzzrL9YLt6eb0T5D0EDl4IQ90IGkua8mHbnxNrkj1d8hbdizMc0Qmg1WnQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.0.1.tgz", + "integrity": "sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew==", "dev": true }, "promise": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.3.tgz", - "integrity": "sha512-HeRDUL1RJiLhyA0/grn+PTShlBAcLuh/1BJGtrvjwbvRDCTLLMEz9rOGCV+R3vHY4MixIuoMEd9Yq/XvsTPcjw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.0.2.tgz", + "integrity": "sha512-EIyzM39FpVOMbqgzEHhxdrEhtOSDOtjMZQ0M6iVfCE+kWNgCkAyOdnuCWqfmflylftfadU6FkiMgHZA2kUzwRw==", "dev": true, "requires": { "asap": "~2.0.6" } + }, + "regenerator-runtime": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz", + "integrity": "sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA==", + "dev": true } } }, @@ -20746,31 +19946,31 @@ } }, "react-dev-utils": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-9.0.3.tgz", - "integrity": "sha512-OyInhcwsvycQ3Zr2pQN+HV4gtRXrky5mJXIy4HnqrWa+mI624xfYfqGuC9dYbxp4Qq3YZzP8GSGQjv0AgNU15w==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-9.0.1.tgz", + "integrity": "sha512-pnaeMo/Pxel8aZpxk1WwxT3uXxM3tEwYvsjCYn5R7gNxjhN1auowdcLDzFB8kr7rafAj2rxmvfic/fbac5CzwQ==", "dev": true, "requires": { - "@babel/code-frame": "7.5.5", - "address": "1.1.0", - "browserslist": "4.6.6", + "@babel/code-frame": "7.0.0", + "address": "1.0.3", + "browserslist": "4.5.4", "chalk": "2.4.2", "cross-spawn": "6.0.5", "detect-port-alt": "1.1.6", "escape-string-regexp": "1.0.5", "filesize": "3.6.1", "find-up": "3.0.0", - "fork-ts-checker-webpack-plugin": "1.5.0", + "fork-ts-checker-webpack-plugin": "1.1.1", "global-modules": "2.0.0", "globby": "8.0.2", - "gzip-size": "5.1.1", + "gzip-size": "5.0.0", "immer": "1.10.0", - "inquirer": "6.5.0", - "is-root": "2.1.0", + "inquirer": "6.2.2", + "is-root": "2.0.0", "loader-utils": "1.2.3", - "open": "^6.3.0", + "opn": "5.4.0", "pkg-up": "2.0.0", - "react-error-overlay": "^6.0.1", + "react-error-overlay": "^5.1.6", "recursive-readdir": "2.2.2", "shell-quote": "1.6.1", "sockjs-client": "1.3.0", @@ -20778,6 +19978,15 @@ "text-table": "0.2.0" }, "dependencies": { + "@babel/code-frame": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz", + "integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.0.0" + } + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -20785,14 +19994,14 @@ "dev": true }, "browserslist": { - "version": "4.6.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.6.6.tgz", - "integrity": "sha512-D2Nk3W9JL9Fp/gIcWei8LrERCS+eXu9AM5cfXA8WEZ84lFks+ARnZ0q/R69m2SV3Wjma83QDDPxsNKXUwdIsyA==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.5.4.tgz", + "integrity": "sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30000984", - "electron-to-chromium": "^1.3.191", - "node-releases": "^1.1.25" + "caniuse-lite": "^1.0.30000955", + "electron-to-chromium": "^1.3.122", + "node-releases": "^1.1.13" } }, "cross-spawn": { @@ -20844,9 +20053,9 @@ } }, "inquirer": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", - "integrity": "sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz", + "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==", "dev": true, "requires": { "ansi-escapes": "^3.2.0", @@ -20855,12 +20064,12 @@ "cli-width": "^2.0.0", "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.17.12", + "lodash": "^4.17.11", "mute-stream": "0.0.7", "run-async": "^2.2.0", "rxjs": "^6.4.0", "string-width": "^2.1.0", - "strip-ansi": "^5.1.0", + "strip-ansi": "^5.0.0", "through": "^2.3.6" } }, @@ -20940,9 +20149,9 @@ } }, "react-error-overlay": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.1.tgz", - "integrity": "sha512-V9yoTr6MeZXPPd4nV/05eCBvGH9cGzc52FN8fs0O0TVQ3HYYf1n7EgZVtHbldRq5xU9zEzoXIITjYNIfxDDdUw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-5.1.6.tgz", + "integrity": "sha512-X1Y+0jR47ImDVr54Ab6V9eGk0Hnu7fVWGeHQSOXHf/C2pF9c6uy3gef8QUeuUiWlNb0i08InPSE5a/KJzNzw1Q==", "dev": true }, "react-fast-compare": { @@ -21079,9 +20288,9 @@ } }, "react-scripts": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.0.0.tgz", - "integrity": "sha512-F4HegoBuUKZvEzXYksQu05Y6vJqallhHkQUEL6M7OQ5rYLBQC/4MTK6km9ZZvEK9TqMy1XA8SSEJGJgTEr6bSQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.0.1.tgz", + "integrity": "sha512-LKEjBhVpEB+c312NeJhzF+NATxF7JkHNr5GhtwMeRS1cMeLElMeIu8Ye7WGHtDP7iz7ra4ryy48Zpo6G/cwWUw==", "dev": true, "requires": { "@babel/core": "7.4.3", @@ -21089,16 +20298,17 @@ "@typescript-eslint/eslint-plugin": "1.6.0", "@typescript-eslint/parser": "1.6.0", "babel-eslint": "10.0.1", - "babel-jest": "24.7.1", + "babel-jest": "^24.8.0", "babel-loader": "8.0.5", "babel-plugin-named-asset-import": "^0.3.2", - "babel-preset-react-app": "^8.0.0", + "babel-preset-react-app": "^9.0.0", + "camelcase": "^5.2.0", "case-sensitive-paths-webpack-plugin": "2.2.0", "css-loader": "2.1.1", "dotenv": "6.2.0", "dotenv-expand": "4.2.0", "eslint": "^5.16.0", - "eslint-config-react-app": "^4.0.0", + "eslint-config-react-app": "^4.0.1", "eslint-loader": "2.1.2", "eslint-plugin-flowtype": "2.50.1", "eslint-plugin-import": "2.16.0", @@ -21123,13 +20333,14 @@ "postcss-normalize": "7.0.1", "postcss-preset-env": "6.6.0", "postcss-safe-parser": "4.0.1", - "react-app-polyfill": "^1.0.0", - "react-dev-utils": "^9.0.0", + "react-app-polyfill": "^1.0.1", + "react-dev-utils": "^9.0.1", "resolve": "1.10.0", "sass-loader": "7.1.0", "semver": "6.0.0", "style-loader": "0.23.1", "terser-webpack-plugin": "1.2.3", + "ts-pnp": "1.1.2", "url-loader": "1.1.2", "webpack": "4.29.6", "webpack-dev-server": "3.2.1", @@ -21137,6 +20348,12 @@ "workbox-webpack-plugin": "4.2.0" }, "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -21341,20 +20558,11 @@ } }, "regexp-tree": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.13.tgz", - "integrity": "sha512-hwdV/GQY5F8ReLZWO+W1SRoN5YfpOKY6852+tBFcma72DKBIcHjPRIlIvQN35bCOljuAfP2G2iB0FC/w236mUw==", + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.11.tgz", + "integrity": "sha512-7/l/DgapVVDzZobwMCCgMlqiqyLFJ0cduo/j+3BcDJIB+yJdsYCfKuI3l/04NV+H/rfNRdPIDbXNZHM9XvQatg==", "dev": true }, - "regexp.prototype.flags": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.2.0.tgz", - "integrity": "sha512-ztaw4M1VqgMwl9HlPpOuiYgItcHlunW0He2fE6eNfT6E/CF2FtYi9ofOYe4mKntstYk0Fyh/rDRBdS3AnxjlrA==", - "dev": true, - "requires": { - "define-properties": "^1.1.2" - } - }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -21362,20 +20570,20 @@ "dev": true }, "regexpu-core": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.5.tgz", - "integrity": "sha512-FpI67+ky9J+cDizQUJlIlNZFKual/lUkFr1AG6zOCpwZ9cLrg8UUVakyUQJD7fCDIe9Z2nwTQJNPyonatNmDFQ==", + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.5.4.tgz", + "integrity": "sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ==", "dev": true, "requires": { "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.1.0", + "regenerate-unicode-properties": "^8.0.2", "regjsgen": "^0.5.0", "regjsparser": "^0.6.0", "unicode-match-property-ecmascript": "^1.0.4", "unicode-match-property-value-ecmascript": "^1.1.0" - "registry-auth-token": { } }, + "registry-auth-token": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.0.0.tgz", "integrity": "sha512-lpQkHxd9UL6tb3k/aHAVfnVtn+Bcs9ob5InuFLLEDqSqeq+AljB8GZW9xY0x7F+xYwEcjKe07nyoxzEYz6yvkw==", @@ -21811,9 +21019,9 @@ } }, "rxjs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", - "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -22133,9 +21341,9 @@ } }, "serialize-javascript": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.0.tgz", - "integrity": "sha512-UkGlcYMtw4d9w7YfCtJFgdRTps8N4L0A48R+SmcGL57ki1+yHwJXnalk5bjgrw+ljv6SfzjzPjhohod2qllg/Q==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.7.0.tgz", + "integrity": "sha512-ke8UG8ulpFOxO8f8gRYabHQe/ZntKlcig2Mp+8+URDP1D8vJZ0KUt7LYo07q25Z/+JVSgpr/cui9PIp5H6/+nA==", "dev": true }, "serve-index": { @@ -22427,9 +21635,9 @@ } }, "sisteransi": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.3.tgz", - "integrity": "sha512-SbEG75TzH8G7eVXFSN5f9EExILKfly7SUvVY5DhhYLvfhKqhDFY0OzevWa/zwak0RLRfWS5AvfMWpd9gJvr5Yg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.2.tgz", + "integrity": "sha512-ZcYcZcT69nSLAR2oLN2JwNmLkJEKGooFMCdvOkFrToUt/WfcRWqhIg4P4KwY4dmLbuyXIx4o4YmPsvMRJYJd/w==", "dev": true }, "slash": { @@ -22988,9 +22196,9 @@ "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==" }, "spdy": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.1.tgz", - "integrity": "sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.0.tgz", + "integrity": "sha512-ot0oEGT/PGUpzf/6uk4AWLqkq+irlqHXkrdbk51oWONh3bxQmBuljxPNl66zlRRcIJStWq0QkLUCPOPjgjvU0Q==", "dev": true, "requires": { "debug": "^4.1.0", @@ -23078,9 +22286,9 @@ "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { "extend-shallow": "^3.0.0" - "split2": { } }, + "split2": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/split2/-/split2-3.1.1.tgz", "integrity": "sha512-emNzr1s7ruq4N+1993yht631/JH+jaj0NYBosuKmLcq+JkGQ9MmTw1RB1fGaTCzUuseRIClrlSLHRNYGwWQ58Q==", @@ -23439,17 +22647,6 @@ "dot-prop": "^4.1.1", "indexes-of": "^1.0.1", "uniq": "^1.0.1" - }, - "dependencies": { - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - } } } } @@ -23570,9 +22767,9 @@ "dev": true }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.4.tgz", + "integrity": "sha512-IIfEAUx5QlODLblLrGTTLJA7Tk0iLSGBvgY8essPRVNGHAzThujww1YqHLs6h3HfTg55h++RzLHH5Xw/rfv+mg==", "dev": true, "requires": { "ajv": "^6.10.2", @@ -23931,9 +23128,9 @@ "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=" }, "timers-browserify": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", - "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", + "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "dev": true, "requires": { "setimmediate": "^1.0.4" @@ -24202,9 +23399,9 @@ } }, "ts-pnp": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.4.tgz", - "integrity": "sha512-1J/vefLC+BWSo+qe8OnJQfWTYRS6ingxjwqmHMqaMxXMj7kFtKLgAaYW3JeX3mktjgUL+etlU8/B4VUAUI9QGw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.2.tgz", + "integrity": "sha512-f5Knjh7XCyRIzoC/z1Su1yLLRrPrFCgtUAh/9fCSP6NKbATwpOL1+idQVXQokK9GRFURn/jYPGPfegIctwunoA==", "dev": true }, "tslib": { @@ -24213,9 +23410,9 @@ "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.14.1.tgz", + "integrity": "sha512-kiuZzD1uUA5DxGj/uxbde+ymp6VVdAxdzOIlAFbYKrPyla8/uiJ9JLBm1QsPhOm4Muj0/+cWEDP99yoCUcSl6Q==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -25851,14 +25048,13 @@ } }, "webpack-dev-middleware": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.1.tgz", - "integrity": "sha512-5MWu9SH1z3hY7oHOV6Kbkz5x7hXbxK56mGHNqHTe6d+ewxOwKUxoUJBs7QIaJb33lPjl9bJZ3X0vCoooUzC36A==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.0.tgz", + "integrity": "sha512-qvDesR1QZRIAZHOE3iQ4CXLZZSQ1lAUsSpnQmlB1PBfoN/xdRjmge3Dok0W4IdaVLJOGJy3sGI4sZHwjRU0PCA==", "dev": true, "requires": { "memory-fs": "^0.4.1", - "mime": "^2.4.4", - "mkdirp": "^0.5.1", + "mime": "^2.4.2", "range-parser": "^1.2.1", "webpack-log": "^2.0.0" }, @@ -26127,9 +25323,9 @@ } }, "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", "dev": true, "requires": { "source-list-map": "^2.0.0", From 8b612ea4a25cfe87ea92dcf70960db8e25571963 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 10 Sep 2019 12:12:20 +0200 Subject: [PATCH 22/42] code fixes --- client/src/components/atoms/Button.tsx | 67 +++++++++---------- .../routes/Publish/Files/Ipfs/index.test.tsx | 2 +- .../src/routes/Publish/Files/index.test.tsx | 29 -------- client/src/routes/Publish/Files/index.tsx | 59 ++++++++++------ 4 files changed, 72 insertions(+), 85 deletions(-) diff --git a/client/src/components/atoms/Button.tsx b/client/src/components/atoms/Button.tsx index bfa9723..a192fca 100644 --- a/client/src/components/atoms/Button.tsx +++ b/client/src/components/atoms/Button.tsx @@ -1,4 +1,4 @@ -import React, { PureComponent } from 'react' +import React from 'react' import { Link } from 'react-router-dom' import cx from 'classnames' import styles from './Button.module.scss' @@ -15,39 +15,34 @@ interface ButtonProps { name?: string } -export default class Button extends PureComponent { - public render() { - let classes - const { - primary, - link, - href, - children, - className, - to, - ...props - } = this.props - - if (primary) { - classes = styles.buttonPrimary - } else if (link) { - classes = styles.link - } else { - classes = styles.button - } - - return to ? ( - - {children} - - ) : href ? ( - - {children} - - ) : ( - - ) - } +function getClasses(primary: boolean | undefined, link: boolean | undefined) { + return primary ? styles.buttonPrimary : link ? styles.link : styles.button } + +const Button = ({ + primary, + link, + href, + children, + className, + to, + ...props +}: ButtonProps) => { + const classes = getClasses(primary, link) + + return to ? ( + + {children} + + ) : href ? ( + + {children} + + ) : ( + + ) +} + +export default Button diff --git a/client/src/routes/Publish/Files/Ipfs/index.test.tsx b/client/src/routes/Publish/Files/Ipfs/index.test.tsx index ffa6384..b47be8b 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.test.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { render, fireEvent, act } from '@testing-library/react' +import { render } from '@testing-library/react' import Ipfs from '.' const addFile = jest.fn() diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index 13fa14f..8f47761 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -34,35 +34,6 @@ const mockResponse = { } } -function flushPromises(ui: any, container: any) { - return new Promise(resolve => - setImmediate(() => { - render(ui, { container }) - resolve(container) - }) - ) -} - -function dispatchEvt(node: any, type: string, data: any) { - const event = new Event(type, { bubbles: true }) - Object.assign(event, data) - fireEvent(node, event) -} - -function mockData(files: any) { - return { - dataTransfer: { - files, - items: files.map((file: any) => ({ - kind: 'file', - type: file.type, - getAsFile: () => file - })), - types: ['Files'] - } - } -} - const renderComponent = () => render( { public state: FilesStates = { isFormShown: false, @@ -55,19 +69,13 @@ export default class Files extends PureComponent { this.signal.cancel() } - private toggleForm = (e: Event) => { + private toggleForm = (e: Event, form: string) => { e.preventDefault() - this.setState({ - isFormShown: !this.state.isFormShown, - isIpfsFormShown: false - }) - } - private toggleIpfsForm = (e: Event) => { - e.preventDefault() this.setState({ - isIpfsFormShown: !this.state.isIpfsFormShown, - isFormShown: false + isFormShown: form === 'url' ? !this.state.isFormShown : false, + isIpfsFormShown: + form === 'ipfs' ? !this.state.isIpfsFormShown : false }) } @@ -90,9 +98,12 @@ export default class Files extends PureComponent { const { contentLength, contentType, found } = response.data.result if (contentLength) file.contentLength = contentLength - if (contentType) file.contentType = contentType - if (contentType) file.compression = cleanupContentType(contentType) - if (found) file.found = found + if (contentType) { + file.contentType = contentType + file.compression = cleanupContentType(contentType) + } + + file.found = found return file } catch (error) { @@ -174,13 +185,23 @@ export default class Files extends PureComponent { )} - + {buttons.map(button => { + const isActive = + (button.id === 'url' && isFormShown) || + (button.id === 'ipfs' && isIpfsFormShown) - + return ( + + ) + })} {isFormShown && ( Date: Tue, 10 Sep 2019 18:42:57 +0200 Subject: [PATCH 23/42] add use-ipfs hook test --- client/package-lock.json | 230 +++++++++++++----- client/package.json | 2 + .../src/components/atoms/Form/Input.test.tsx | 18 +- client/src/hooks/use-ipfs.test.tsx | 10 + 4 files changed, 185 insertions(+), 75 deletions(-) create mode 100644 client/src/hooks/use-ipfs.test.tsx diff --git a/client/package-lock.json b/client/package-lock.json index 6639a12..cb18ca7 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -2572,6 +2572,17 @@ "@testing-library/dom": "^5.5.4" } }, + "@testing-library/react-hooks": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@testing-library/react-hooks/-/react-hooks-1.1.0.tgz", + "integrity": "sha512-piE/ceQoNf134FFVXBABDbttBJ8eLPD4eg7zIciVJv92RyvoIsBHCvvG8Vd4IG5pyuWYrkLsZTO8ucZBwa4twA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.4.2", + "@types/react": "^16.8.22", + "@types/react-test-renderer": "^16.8.2" + } + }, "@types/babel__core": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz", @@ -2790,6 +2801,15 @@ "@types/react-router": "*" } }, + "@types/react-test-renderer": { + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-16.9.0.tgz", + "integrity": "sha512-bN5EyjtuTY35xX7N5j0KP1vg5MpUXHpFTX6tGsqkNOthjNvet4VQOYRxFh+NT5cDSJrATmAFK9NLeYZ4mp/o0Q==", + "dev": true, + "requires": { + "@types/react": "*" + } + }, "@types/react-transition-group": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.2.0.tgz", @@ -9387,22 +9407,26 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "optional": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "optional": true, "requires": { "delegates": "^1.0.0", @@ -9411,12 +9435,14 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "optional": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": false, + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -9425,32 +9451,38 @@ }, "chownr": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "optional": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "optional": true }, "debug": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "optional": true, "requires": { "ms": "^2.1.1" @@ -9458,22 +9490,26 @@ }, "deep-extend": { "version": "0.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "optional": true, "requires": { "minipass": "^2.2.1" @@ -9481,12 +9517,14 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "optional": true, "requires": { "aproba": "^1.0.3", @@ -9501,7 +9539,8 @@ }, "glob": { "version": "7.1.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -9514,12 +9553,14 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "optional": true }, "iconv-lite": { "version": "0.4.24", - "bundled": true, + "resolved": false, + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -9527,7 +9568,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "optional": true, "requires": { "minimatch": "^3.0.4" @@ -9535,7 +9577,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "optional": true, "requires": { "once": "^1.3.0", @@ -9544,17 +9587,20 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "optional": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -9562,12 +9608,14 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "optional": true, "requires": { "brace-expansion": "^1.1.7" @@ -9575,12 +9623,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": false, + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "optional": true }, "minipass": { "version": "2.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -9589,7 +9639,8 @@ }, "minizlib": { "version": "1.2.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "optional": true, "requires": { "minipass": "^2.2.1" @@ -9597,7 +9648,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "optional": true, "requires": { "minimist": "0.0.8" @@ -9605,12 +9657,14 @@ }, "ms": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "optional": true }, "needle": { "version": "2.3.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-CaLXV3W8Vnbps8ZANqDGz7j4x7Yj1LW4TWF/TQuDfj7Cfx4nAPTvw98qgTevtto1oHDrh3pQkaODbqupXlsWTg==", "optional": true, "requires": { "debug": "^4.1.0", @@ -9620,7 +9674,8 @@ }, "node-pre-gyp": { "version": "0.13.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Md1D3xnEne8b/HGVQkZZwV27WUi1ZRuZBij24TNaZwUPU3ZAFtvT6xxJGaUVillfmMKnn5oD1HoGsp2Ftik7SQ==", "optional": true, "requires": { "detect-libc": "^1.0.2", @@ -9637,7 +9692,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "optional": true, "requires": { "abbrev": "1", @@ -9646,12 +9702,14 @@ }, "npm-bundled": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "optional": true }, "npm-packlist": { "version": "1.4.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -9660,7 +9718,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -9671,17 +9730,20 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "optional": true, "requires": { "wrappy": "1" @@ -9689,17 +9751,20 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -9708,17 +9773,20 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "optional": true }, "rc": { "version": "1.2.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "optional": true, "requires": { "deep-extend": "^0.6.0", @@ -9729,14 +9797,16 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "optional": true } } }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -9750,7 +9820,8 @@ }, "rimraf": { "version": "2.6.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "optional": true, "requires": { "glob": "^7.1.3" @@ -9758,37 +9829,44 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "optional": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "optional": true }, "semver": { "version": "5.7.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -9798,7 +9876,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -9806,7 +9885,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -9814,12 +9894,14 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "optional": true }, "tar": { "version": "4.4.8", - "bundled": true, + "resolved": false, + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "optional": true, "requires": { "chownr": "^1.1.1", @@ -9833,12 +9915,14 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "optional": true }, "wide-align": { "version": "1.1.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -9846,12 +9930,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "optional": true } } @@ -20407,6 +20493,18 @@ "shallowequal": "^1.0.1" } }, + "react-test-renderer": { + "version": "16.8.6", + "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.8.6.tgz", + "integrity": "sha512-H2srzU5IWYT6cZXof6AhUcx/wEyJddQ8l7cLM/F7gDXYyPr4oq+vCIxJYXVGhId1J706sqziAjuOEjyNkfgoEw==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.6.2", + "react-is": "^16.8.6", + "scheduler": "^0.13.6" + } + }, "react-transition-group": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.2.1.tgz", diff --git a/client/package.json b/client/package.json index d3d0aaf..ef505c9 100644 --- a/client/package.json +++ b/client/package.json @@ -51,6 +51,7 @@ "@react-mock/state": "^0.1.8", "@testing-library/jest-dom": "^4.0.0", "@testing-library/react": "^8.0.7", + "@testing-library/react-hooks": "^1.1.0", "@types/classnames": "^2.2.9", "@types/filesize": "^4.1.0", "@types/is-url": "^1.2.28", @@ -69,6 +70,7 @@ "jest-mock-axios": "^3.1.0", "node-sass": "^4.12.0", "react-scripts": "^3.0.0", + "react-test-renderer": "16.8.6", "source-map-explorer": "^2.0.1", "typescript": "^3.6.2" }, diff --git a/client/src/components/atoms/Form/Input.test.tsx b/client/src/components/atoms/Form/Input.test.tsx index dfd533c..d653fa5 100644 --- a/client/src/components/atoms/Form/Input.test.tsx +++ b/client/src/components/atoms/Form/Input.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { render } from '@testing-library/react' +import { render, fireEvent } from '@testing-library/react' import Input from './Input' describe('Input', () => { @@ -7,10 +7,10 @@ describe('Input', () => { const { container } = render() expect(container.firstChild).toBeInTheDocument() expect(container.querySelector('.label')).toHaveTextContent('My Input') - expect(container.querySelector('.input')).toHaveAttribute( - 'id', - 'my-input' - ) + + const input = container.querySelector('.input') + expect(input).toHaveAttribute('id', 'my-input') + input && fireEvent.focus(input) }) it('renders as text input by default', () => { @@ -25,13 +25,13 @@ describe('Input', () => { const { container } = render( ) - expect(container.querySelector('.input')).toHaveAttribute( - 'type', - 'search' - ) + const input = container.querySelector('.input') + expect(input).toHaveAttribute('type', 'search') expect(container.querySelector('label + div')).toHaveClass( 'inputWrapSearch' ) + + input && fireEvent.focus(input) }) it('renders select', () => { diff --git a/client/src/hooks/use-ipfs.test.tsx b/client/src/hooks/use-ipfs.test.tsx new file mode 100644 index 0000000..9a9b747 --- /dev/null +++ b/client/src/hooks/use-ipfs.test.tsx @@ -0,0 +1,10 @@ +import { renderHook } from '@testing-library/react-hooks' +import useIpfs from './use-ipfs' + +describe('use-ipfs', () => { + it('can be called', () => { + const { result, unmount } = renderHook(() => useIpfs()) + expect(result.current.ipfsVersion).toBe('') + unmount() + }) +}) From 302986d63b685d5704b41c533cf960be82679449 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 11 Sep 2019 00:59:56 +0200 Subject: [PATCH 24/42] test updates --- .travis.yml | 12 +- client/package-lock.json | 164 +++++++----------- client/package.json | 2 - client/src/hooks/use-ipfs.test.tsx | 10 -- .../routes/Publish/Files/Ipfs/index.test.tsx | 16 +- server/src/{config => }/config.ts | 0 server/src/routes/ReportRouter.ts | 2 +- server/src/routes/UrlCheckRouter.ts | 2 +- server/src/server.ts | 2 +- server/test/api.test.ts | 25 +++ 10 files changed, 114 insertions(+), 121 deletions(-) delete mode 100644 client/src/hooks/use-ipfs.test.tsx rename server/src/{config => }/config.ts (100%) diff --git a/.travis.yml b/.travis.yml index a1d0972..a0e7b0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,16 +57,14 @@ script: - ./scripts/keeper.sh - ./scripts/test.sh || travis_terminate 1 - ./scripts/coverage.sh + # Pipe the coverage data to Code Climate + - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.client.json client/coverage/lcov.info + - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.server.json server/coverage/lcov.info + - ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2 + - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi - npm run test:e2e || travis_terminate 1 - ./scripts/build.sh -# Pipe the coverage data to Code Climate -after_script: - - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.client.json client/coverage/lcov.info # Format client coverage - - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.server.json server/coverage/lcov.info # Format server coverage - - ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2 # Sum both coverage parts into coverage/codeclimate.json - - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi # Upload coverage/codeclimate.json - notifications: email: false diff --git a/client/package-lock.json b/client/package-lock.json index cb18ca7..b71fd1d 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -2572,17 +2572,6 @@ "@testing-library/dom": "^5.5.4" } }, - "@testing-library/react-hooks": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@testing-library/react-hooks/-/react-hooks-1.1.0.tgz", - "integrity": "sha512-piE/ceQoNf134FFVXBABDbttBJ8eLPD4eg7zIciVJv92RyvoIsBHCvvG8Vd4IG5pyuWYrkLsZTO8ucZBwa4twA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.2", - "@types/react": "^16.8.22", - "@types/react-test-renderer": "^16.8.2" - } - }, "@types/babel__core": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.2.tgz", @@ -2801,15 +2790,6 @@ "@types/react-router": "*" } }, - "@types/react-test-renderer": { - "version": "16.9.0", - "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-16.9.0.tgz", - "integrity": "sha512-bN5EyjtuTY35xX7N5j0KP1vg5MpUXHpFTX6tGsqkNOthjNvet4VQOYRxFh+NT5cDSJrATmAFK9NLeYZ4mp/o0Q==", - "dev": true, - "requires": { - "@types/react": "*" - } - }, "@types/react-transition-group": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.2.0.tgz", @@ -9407,25 +9387,25 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "optional": true }, "aproba": { "version": "1.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "optional": true, "requires": { @@ -9435,13 +9415,13 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "optional": true }, "brace-expansion": { "version": "1.1.11", - "resolved": false, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "optional": true, "requires": { @@ -9451,37 +9431,37 @@ }, "chownr": { "version": "1.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "optional": true }, "concat-map": { "version": "0.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "optional": true }, "console-control-strings": { "version": "1.1.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "optional": true }, "core-util-is": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "optional": true }, "debug": { "version": "4.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "optional": true, "requires": { @@ -9490,25 +9470,25 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "optional": true }, "delegates": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "optional": true, "requires": { @@ -9517,13 +9497,13 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "optional": true }, "gauge": { "version": "2.7.4", - "resolved": false, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "optional": true, "requires": { @@ -9539,7 +9519,7 @@ }, "glob": { "version": "7.1.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "optional": true, "requires": { @@ -9553,13 +9533,13 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "optional": true }, "iconv-lite": { "version": "0.4.24", - "resolved": false, + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "optional": true, "requires": { @@ -9568,7 +9548,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "optional": true, "requires": { @@ -9577,7 +9557,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": false, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "optional": true, "requires": { @@ -9587,19 +9567,19 @@ }, "inherits": { "version": "2.0.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "optional": true }, "ini": { "version": "1.3.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "optional": true, "requires": { @@ -9608,13 +9588,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": false, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "optional": true, "requires": { @@ -9623,13 +9603,13 @@ }, "minimist": { "version": "0.0.8", - "resolved": false, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "optional": true }, "minipass": { "version": "2.3.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "optional": true, "requires": { @@ -9639,7 +9619,7 @@ }, "minizlib": { "version": "1.2.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "optional": true, "requires": { @@ -9648,7 +9628,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "optional": true, "requires": { @@ -9657,13 +9637,13 @@ }, "ms": { "version": "2.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "optional": true }, "needle": { "version": "2.3.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.1.tgz", "integrity": "sha512-CaLXV3W8Vnbps8ZANqDGz7j4x7Yj1LW4TWF/TQuDfj7Cfx4nAPTvw98qgTevtto1oHDrh3pQkaODbqupXlsWTg==", "optional": true, "requires": { @@ -9674,7 +9654,7 @@ }, "node-pre-gyp": { "version": "0.13.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.13.0.tgz", "integrity": "sha512-Md1D3xnEne8b/HGVQkZZwV27WUi1ZRuZBij24TNaZwUPU3ZAFtvT6xxJGaUVillfmMKnn5oD1HoGsp2Ftik7SQ==", "optional": true, "requires": { @@ -9692,7 +9672,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "optional": true, "requires": { @@ -9702,13 +9682,13 @@ }, "npm-bundled": { "version": "1.0.6", - "resolved": false, + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "optional": true }, "npm-packlist": { "version": "1.4.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "optional": true, "requires": { @@ -9718,7 +9698,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "optional": true, "requires": { @@ -9730,19 +9710,19 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "optional": true }, "once": { "version": "1.4.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "optional": true, "requires": { @@ -9751,19 +9731,19 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "optional": true }, "osenv": { "version": "0.1.5", - "resolved": false, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "optional": true, "requires": { @@ -9773,19 +9753,19 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "optional": true }, "rc": { "version": "1.2.8", - "resolved": false, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "optional": true, "requires": { @@ -9797,7 +9777,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "optional": true } @@ -9805,7 +9785,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": false, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "optional": true, "requires": { @@ -9820,7 +9800,7 @@ }, "rimraf": { "version": "2.6.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "optional": true, "requires": { @@ -9829,43 +9809,43 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "optional": true }, "safer-buffer": { "version": "2.1.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "optional": true }, "sax": { "version": "1.2.4", - "resolved": false, + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "optional": true }, "semver": { "version": "5.7.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": false, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "optional": true }, "string-width": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "optional": true, "requires": { @@ -9876,7 +9856,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "optional": true, "requires": { @@ -9885,7 +9865,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "optional": true, "requires": { @@ -9894,13 +9874,13 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": false, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "optional": true }, "tar": { "version": "4.4.8", - "resolved": false, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "optional": true, "requires": { @@ -9915,13 +9895,13 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "optional": true }, "wide-align": { "version": "1.1.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "optional": true, "requires": { @@ -9930,13 +9910,13 @@ }, "wrappy": { "version": "1.0.2", - "resolved": false, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "optional": true }, "yallist": { "version": "3.0.3", - "resolved": false, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "optional": true } @@ -20493,18 +20473,6 @@ "shallowequal": "^1.0.1" } }, - "react-test-renderer": { - "version": "16.8.6", - "resolved": "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.8.6.tgz", - "integrity": "sha512-H2srzU5IWYT6cZXof6AhUcx/wEyJddQ8l7cLM/F7gDXYyPr4oq+vCIxJYXVGhId1J706sqziAjuOEjyNkfgoEw==", - "dev": true, - "requires": { - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "react-is": "^16.8.6", - "scheduler": "^0.13.6" - } - }, "react-transition-group": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.2.1.tgz", diff --git a/client/package.json b/client/package.json index ef505c9..d3d0aaf 100644 --- a/client/package.json +++ b/client/package.json @@ -51,7 +51,6 @@ "@react-mock/state": "^0.1.8", "@testing-library/jest-dom": "^4.0.0", "@testing-library/react": "^8.0.7", - "@testing-library/react-hooks": "^1.1.0", "@types/classnames": "^2.2.9", "@types/filesize": "^4.1.0", "@types/is-url": "^1.2.28", @@ -70,7 +69,6 @@ "jest-mock-axios": "^3.1.0", "node-sass": "^4.12.0", "react-scripts": "^3.0.0", - "react-test-renderer": "16.8.6", "source-map-explorer": "^2.0.1", "typescript": "^3.6.2" }, diff --git a/client/src/hooks/use-ipfs.test.tsx b/client/src/hooks/use-ipfs.test.tsx deleted file mode 100644 index 9a9b747..0000000 --- a/client/src/hooks/use-ipfs.test.tsx +++ /dev/null @@ -1,10 +0,0 @@ -import { renderHook } from '@testing-library/react-hooks' -import useIpfs from './use-ipfs' - -describe('use-ipfs', () => { - it('can be called', () => { - const { result, unmount } = renderHook(() => useIpfs()) - expect(result.current.ipfsVersion).toBe('') - unmount() - }) -}) diff --git a/client/src/routes/Publish/Files/Ipfs/index.test.tsx b/client/src/routes/Publish/Files/Ipfs/index.test.tsx index b47be8b..403f8df 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.test.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.test.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { render } from '@testing-library/react' +import { render, fireEvent } from '@testing-library/react' import Ipfs from '.' const addFile = jest.fn() @@ -14,4 +14,18 @@ describe('Ipfs', () => { // wait for IPFS node await findByText(/Connected to /) }) + + it('files can be dropped', async () => { + const { container, findByText } = render(ui) + + // wait for IPFS node + await findByText(/Connected to /) + + const fileContents = 'file contents' + const file = new Blob([fileContents], { type: 'text/plain' }) + + // drop a file + const dropzoneInput = container.querySelector('input') + dropzoneInput && fireEvent.change(dropzoneInput, { target: [file] }) + }) }) diff --git a/server/src/config/config.ts b/server/src/config.ts similarity index 100% rename from server/src/config/config.ts rename to server/src/config.ts diff --git a/server/src/routes/ReportRouter.ts b/server/src/routes/ReportRouter.ts index 3bdd1bb..0883a5e 100644 --- a/server/src/routes/ReportRouter.ts +++ b/server/src/routes/ReportRouter.ts @@ -1,6 +1,6 @@ import { Router, Request, Response } from 'express' import SendgridMail from '@sendgrid/mail' -import config from '../config/config' +import config from '../config' SendgridMail.setApiKey(config.sendgridApiKey) diff --git a/server/src/routes/UrlCheckRouter.ts b/server/src/routes/UrlCheckRouter.ts index 91951c2..533f18e 100644 --- a/server/src/routes/UrlCheckRouter.ts +++ b/server/src/routes/UrlCheckRouter.ts @@ -1,6 +1,6 @@ import { Router, Request, Response } from 'express' import request from 'request' -import config from '../config/config' +import config from '../config' export class UrlCheckRouter { public router: Router diff --git a/server/src/server.ts b/server/src/server.ts index f16eabd..1662ab3 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -10,7 +10,7 @@ import UrlCheckRouter from './routes/UrlCheckRouter' import ReportRouter from './routes/ReportRouter' // config -import config from './config/config' +import config from './config' // debug const log = debug('server:index') diff --git a/server/test/api.test.ts b/server/test/api.test.ts index f368ff3..07b87ae 100644 --- a/server/test/api.test.ts +++ b/server/test/api.test.ts @@ -39,6 +39,31 @@ describe('POST /api/v1/urlcheck', () => { }) describe('POST /api/v1/report', () => { + const msg = { + to: 'test@example.com', + from: 'test@example.com', + subject: 'My Subject', + text: 'Text', + html: 'HTML' + } + + it('responds with json', async () => { + const response = await request(server) + .post('/api/v1/report') + .send({ msg }) + expect(response.status).toBe(200) + expect(response.body).toBeTruthy() + }) + + it('responds with error', async () => { + const response = await request(server) + .post('/api/v1/report') + .send({ msg: 'Hello World' }) + expect(response.text).toBe( + "undefined - Cannot create property 'isMultiple' on string 'Hello World'" + ) + }) + it('responds with error message when message is missing', async () => { const response = await request(server).post('/api/v1/report') const text = await JSON.parse(response.text) From 6d4b6b77c20a6a17b1edf363cda29b552be050c7 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 18 Sep 2019 12:52:42 +0200 Subject: [PATCH 25/42] refactor IPFS dropzone * only allow single file for now * async file content reading * output list of files by default in Dropzone component --- client/package-lock.json | 316 +++++++++--------- client/package.json | 2 +- .../components/molecules/Dropzone.module.scss | 8 + client/src/components/molecules/Dropzone.tsx | 60 +++- .../src/routes/Publish/Files/Ipfs/index.tsx | 81 +++-- .../src/routes/Publish/Files/Ipfs/utils.tsx | 20 +- client/src/routes/Publish/Files/index.tsx | 18 +- client/src/routes/Publish/index.tsx | 3 +- client/src/utils/utils.ts | 13 + 9 files changed, 291 insertions(+), 230 deletions(-) create mode 100644 client/src/utils/utils.ts diff --git a/client/package-lock.json b/client/package-lock.json index b71fd1d..268b424 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1426,9 +1426,9 @@ } }, "@hapi/subtext": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-6.1.1.tgz", - "integrity": "sha512-Y7NjKFRPwlzKRw5IdwRou42hR4IBQZolT+/DlvfSr/CBjGyu38n5+9LKfNKzqB/0AVEk+xynCijsx1o1UVWX8A==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-6.1.2.tgz", + "integrity": "sha512-G1kqD1E2QdxpvpL26WieIyo3z0qCa/sAGSa2TJI/PYPWCR9rL0rqFvhWY774xPZ4uK1PV3TIaJcx8AruAvxclg==", "requires": { "@hapi/boom": "7.x.x", "@hapi/bourne": "1.x.x", @@ -1759,9 +1759,9 @@ } }, "@oceanprotocol/squid": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.7.2.tgz", - "integrity": "sha512-zIfGeqrFi0fZsSiFREq66xTxD0FMO6pBsNCsLFn7KlCq4H6keSSif0iIiDboBQ28uOuqZEG1t7HomCYrmXuoEg==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@oceanprotocol/squid/-/squid-0.7.3.tgz", + "integrity": "sha512-6Tgf8iwFJFkvVWhpdn0vrmGQE6t8h1bnepjO0wYEjGl/5Xd1VLEbwDTiOVuAUHyvVIPFcG83XGC4L0L1JfqeUQ==", "requires": { "@oceanprotocol/keeper-contracts": "^0.11.1", "@oceanprotocol/secret-store-client": "0.0.15", @@ -1877,6 +1877,15 @@ "graceful-fs": "^4.1.6" } }, + "minipass": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.6.5.tgz", + "integrity": "sha512-ewSKOPFH9blOLXx0YSE+mbrNMBFPS+11a2b03QZ+P4LVrUHW/GAlqeYC7DBknDyMWkHzrzTpDhUvy7MUxqyrPA==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, "nan": { "version": "2.14.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", @@ -1985,13 +1994,13 @@ } }, "tar": { - "version": "4.4.10", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.10.tgz", - "integrity": "sha512-g2SVs5QIxvo6OLp0GudTqEf05maawKUxXru104iaayWA09551tFCTI8f1Asb4lPfkBr91k07iL4c11XO3/b0tA==", + "version": "4.4.11", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.11.tgz", + "integrity": "sha512-iI4zh3ktLJKaDNZKZc+fUONiQrSn9HkCFzamtb7k8FFmVilHVob7QsLX/VySAW8lAviMzMbFw4QtFb4errwgYA==", "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.5", + "minipass": "^2.6.4", "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", @@ -2833,12 +2842,6 @@ "integrity": "sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw==", "dev": true }, - "@types/yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-wBlsw+8n21e6eTd4yVv8YD/E3xq0O6nNnJIquutAsFGE7EyMKz7W6RNT6BRu1SmdgmlCZ9tb0X+j+D6HGr8pZw==", - "dev": true - }, "@typescript-eslint/eslint-plugin": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.6.0.tgz", @@ -3134,9 +3137,9 @@ } }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", + "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", "dev": true }, "acorn-walk": { @@ -6843,7 +6846,6 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, "requires": { "is-obj": "^1.0.0" } @@ -7234,111 +7236,6 @@ } } }, - "eslint": { - "version": "5.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", - "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "ajv": "^6.9.1", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^4.0.1", - "doctrine": "^3.0.0", - "eslint-scope": "^4.0.3", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^5.0.1", - "esquery": "^1.0.1", - "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.6", - "import-fresh": "^3.0.0", - "imurmurhash": "^0.1.4", - "inquirer": "^6.2.2", - "js-yaml": "^3.13.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.11", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^5.5.1", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^5.2.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "import-fresh": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", - "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "eslint-config-react-app": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-4.0.1.tgz", @@ -7650,17 +7547,6 @@ "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", "dev": true }, - "espree": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", - "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", - "dev": true, - "requires": { - "acorn": "^6.0.7", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - } - }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -8599,6 +8485,7 @@ "inherits": "^2.0.3", "readable-stream": "^2.3.6" } + }, "fnv1a": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/fnv1a/-/fnv1a-1.0.1.tgz", @@ -10911,9 +10798,9 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.0.tgz", - "integrity": "sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "dev": true, "requires": { "ansi-escapes": "^3.2.0", @@ -12423,7 +12310,6 @@ "is-alphabetical": "^1.0.0", "is-decimal": "^1.0.0" } - "is-arguments": { }, "is-arrayish": { "version": "0.2.1", @@ -16960,9 +16846,9 @@ "integrity": "sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18=" }, "nanoid": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.1.tgz", - "integrity": "sha512-0YbJdaL4JFoejIOoawgLcYValFGJ2iyUuVDIWL3g8Es87SSOWFbWdRUMV3VMSiyPs3SQ3QxCIxFX00q5DLkMCw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.0.tgz", + "integrity": "sha512-g5WwS+p6Cm+zQhO2YOpRbQThZVnNb7DDq74h8YDCLfAGynrEOrbx2E16dc8ciENiP1va5sqaAruqn2sN+xpkWg==" }, "nanomatch": { "version": "1.2.13", @@ -17422,12 +17308,6 @@ "integrity": "sha512-OSuu/pU4ENM9kmREg0BdNrUDIl1heYa4mBZacJc+vVWz4GtAwu7jO8s4AIt2aGRUTqxykpWzI3Oqnsm13tTMDA==", "dev": true }, - "object-is": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.1.tgz", - "integrity": "sha1-CqYOyZiaCz7Xlc9NBvYs8a1lObY=", - "dev": true - }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -20414,12 +20294,111 @@ "workbox-webpack-plugin": "4.2.0" }, "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.13.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "fs-extra": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", @@ -20438,6 +20417,16 @@ "dev": true, "optional": true }, + "import-fresh": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -20447,6 +20436,12 @@ "graceful-fs": "^4.1.6" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "resolve": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", @@ -20456,11 +20451,26 @@ "path-parse": "^1.0.6" } }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, "semver": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.0.0.tgz", "integrity": "sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ==", "dev": true + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } } } }, @@ -21134,9 +21144,9 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } - "sanitize-filename": { } }, + "sanitize-filename": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz", "integrity": "sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==", @@ -22833,9 +22843,9 @@ "dev": true }, "table": { - "version": "5.4.4", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.4.tgz", - "integrity": "sha512-IIfEAUx5QlODLblLrGTTLJA7Tk0iLSGBvgY8essPRVNGHAzThujww1YqHLs6h3HfTg55h++RzLHH5Xw/rfv+mg==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "dev": true, "requires": { "ajv": "^6.10.2", diff --git a/client/package.json b/client/package.json index d3d0aaf..ad37219 100644 --- a/client/package.json +++ b/client/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@oceanprotocol/art": "^2.2.0", - "@oceanprotocol/squid": "^0.7.2", + "@oceanprotocol/squid": "^0.7.3", "@oceanprotocol/typographies": "^0.1.0", "@sindresorhus/slugify": "^0.9.1", "axios": "^0.19.0", diff --git a/client/src/components/molecules/Dropzone.module.scss b/client/src/components/molecules/Dropzone.module.scss index a6518ab..685929c 100644 --- a/client/src/components/molecules/Dropzone.module.scss +++ b/client/src/components/molecules/Dropzone.module.scss @@ -35,3 +35,11 @@ opacity: .5; pointer-events: none; } + +.dropzoneFiles { + padding: $spacer 0; + + ul { + margin: 0; + } +} diff --git a/client/src/components/molecules/Dropzone.tsx b/client/src/components/molecules/Dropzone.tsx index d8ed890..57b4f48 100644 --- a/client/src/components/molecules/Dropzone.tsx +++ b/client/src/components/molecules/Dropzone.tsx @@ -1,34 +1,62 @@ import React, { useCallback } from 'react' import { useDropzone } from 'react-dropzone' import styles from './Dropzone.module.scss' +import { formatBytes } from '../../utils/utils' export default function Dropzone({ handleOnDrop, - disabled + disabled, + multiple }: { handleOnDrop(files: File[]): void disabled?: boolean + multiple?: boolean }) { const onDrop = useCallback(acceptedFiles => handleOnDrop(acceptedFiles), [ handleOnDrop ]) - const { getRootProps, getInputProps, isDragActive } = useDropzone({ - onDrop - }) + const { + acceptedFiles, + getRootProps, + getInputProps, + isDragActive, + isDragReject + } = useDropzone({ onDrop }) + + const files = acceptedFiles.map((file: any) => ( +
  • + {file.path} - {formatBytes(file.size, 0)} +
  • + )) return ( -
    - -

    {`Drag 'n' drop some files here, or click to select files`}

    -
    + <> + {acceptedFiles.length > 0 ? ( + + ) : ( +
    + +

    + {isDragActive && !isDragReject + ? `Drop it like it's hot!` + : multiple + ? `Drag 'n' drop some files here, or click to select files` + : `Drag 'n' drop a file here, or click to select a file`} + {} +

    +
    + )} + ) } diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index 6810d68..dbdb837 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -1,11 +1,12 @@ /* eslint-disable no-console */ -import React, { useState } from 'react' +import React, { useState, useEffect } from 'react' import useIpfsApi from '../../../../hooks/use-ipfs-api' import Label from '../../../../components/atoms/Form/Label' import Spinner from '../../../../components/atoms/Spinner' import Dropzone from '../../../../components/molecules/Dropzone' -import { formatBytes, pingUrl } from './utils' +import { formatBytes } from '../../../../utils/utils' +import { pingUrl, readFileAsync } from './utils' import { ipfsGatewayUri } from '../../../../config' import styles from './index.module.scss' @@ -26,54 +27,56 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') + const [received, setReceived] = useState(0) - async function saveToIpfs(data: Buffer, size: number) { - const totalSize = formatBytes(size, 0) - - setLoading(true) - setMessage(`Adding to IPFS
    0/${totalSize}
    `) + useEffect(() => { + setMessage( + `Adding to IPFS
    + ${formatBytes(received, 0)}
    ` + ) + }, [received]) + async function addToIpfs(data: Buffer | ArrayBuffer | File | File[]) { try { const response = await ipfs.add(data, { - progress: (length: number) => - setMessage( - `Adding to IPFS
    - ${formatBytes( - length, - 0 - )}/${totalSize}
    ` - ) + progress: (length: number) => { + console.log(`Received: ${formatBytes(length, 0)}`) + setReceived(length) + } }) - + console.log(response) const cid = response[0].hash console.log(`File added: ${cid}`) - - // Ping gateway url to make it globally available, - // but store native url in DDO. - const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}` - const url = `ipfs://${cid}` - - setMessage('Checking IPFS gateway URL') - await pingUrl(urlGateway) - - // add IPFS url to file.url - addFile(url) + return cid } catch (error) { console.error(`Adding to IPFS failed: ${error.message}`) setLoading(false) } } - function handleOnDrop(files: File[]) { - files.forEach((file: File) => { - const reader: any = new FileReader() + async function handleOnDrop(acceptedFiles: File[]) { + const { size } = acceptedFiles[0] + const totalSize = formatBytes(size, 0) - reader.readAsArrayBuffer(file) - reader.onloadend = () => { - const buffer: any = Buffer.from(reader.result) - saveToIpfs(buffer, file.size) - } - }) + setLoading(true) + setMessage(`Adding to IPFS
    0/${totalSize}
    `) + + // Add file to IPFS node + const content: any = await readFileAsync(acceptedFiles[0]) + const data = Buffer.from(content) + const cid = await addToIpfs(data) + if (!cid) return + + // Ping gateway url to make it globally available, + // but store native url in DDO. + const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}` + const url = `ipfs://${cid}` + + setMessage('Checking IPFS gateway URL') + await pingUrl(urlGateway) + + // add IPFS url to file.url + addFile(url) } return ( @@ -84,7 +87,11 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { {loading ? ( ) : ( - + )} {ipfsMessage !== '' && (
    diff --git a/client/src/routes/Publish/Files/Ipfs/utils.tsx b/client/src/routes/Publish/Files/Ipfs/utils.tsx index c64937e..24d0efb 100644 --- a/client/src/routes/Publish/Files/Ipfs/utils.tsx +++ b/client/src/routes/Publish/Files/Ipfs/utils.tsx @@ -13,12 +13,16 @@ export async function pingUrl(url: string) { } } -export function formatBytes(a: number, b: number) { - if (a === 0) return '0 Bytes' - const c = 1024 - const d = b || 2 - const e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] - const f = Math.floor(Math.log(a) / Math.log(c)) - - return parseFloat((a / Math.pow(c, f)).toFixed(d)) + ' ' + e[f] +export function readFileAsync(file: File) { + return new Promise((resolve, reject) => { + const reader = new FileReader() + reader.onerror = () => { + reader.abort() + reject(new DOMException('Problem parsing input file.')) + } + reader.onload = () => { + resolve(reader.result) + } + reader.readAsArrayBuffer(file) + }) } diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index 186c18c..debc526 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -1,6 +1,7 @@ import React, { FormEvent, PureComponent, ChangeEvent } from 'react' import axios from 'axios' -import { Logger } from '@oceanprotocol/squid' +import { Logger, File } from '@oceanprotocol/squid' +import shortid from 'shortid' import Button from '../../../components/atoms/Button' import Help from '../../../components/atoms/Form/Help' import ItemForm from './ItemForm' @@ -10,17 +11,8 @@ import styles from './index.module.scss' import { serviceUri } from '../../../config' import cleanupContentType from '../../../utils/cleanupContentType' -import shortid from 'shortid' -export interface File { - url: string - contentType: string - checksum?: string - checksumType?: string - contentLength?: number - resourceId?: string - encoding?: string - compression?: string +export interface FilePublish extends File { found: boolean // non-standard } @@ -80,7 +72,7 @@ export default class Files extends PureComponent { } private async getFile(url: string) { - const file: File = { + const file: FilePublish = { url, contentType: '', found: false // non-standard @@ -124,7 +116,7 @@ export default class Files extends PureComponent { }) } - const file: File | undefined = await this.getFile(url) + const file: FilePublish | undefined = await this.getFile(url) file && this.props.files.push(file) const event = { diff --git a/client/src/routes/Publish/index.tsx b/client/src/routes/Publish/index.tsx index fe31035..e4b8e57 100644 --- a/client/src/routes/Publish/index.tsx +++ b/client/src/routes/Publish/index.tsx @@ -1,5 +1,5 @@ import React, { ChangeEvent, Component, FormEvent } from 'react' -import { Logger } from '@oceanprotocol/squid' +import { Logger, File } from '@oceanprotocol/squid' import Web3 from 'web3' import Route from '../../components/templates/Route' import Form from '../../components/atoms/Form/Form' @@ -11,7 +11,6 @@ import ReactGA from 'react-ga' import { allowPricing } from '../../config' import { steps } from '../../data/form-publish.json' import Content from '../../components/atoms/Content' -import { File } from './Files' import withTracker from '../../hoc/withTracker' type AssetType = 'dataset' | 'algorithm' | 'container' | 'workflow' | 'other' diff --git a/client/src/utils/utils.ts b/client/src/utils/utils.ts new file mode 100644 index 0000000..d7823a5 --- /dev/null +++ b/client/src/utils/utils.ts @@ -0,0 +1,13 @@ +export function formatBytes(a: number, b: number) { + if (a === 0) return '0 Bytes' + const c = 1024 + const d = b || 2 + const e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] + const f = Math.floor(Math.log(a) / Math.log(c)) + + return parseFloat((a / Math.pow(c, f)).toFixed(d)) + ' ' + e[f] +} + +export function arraySum(array: number[]) { + return array.reduce((a, b) => a + b, 0) +} From ba3704dcce86075b74c84e1d074090802920b546 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 18 Sep 2019 13:31:34 +0200 Subject: [PATCH 26/42] preserve original file names --- .travis.yml | 2 +- .../src/routes/Publish/Files/Ipfs/index.tsx | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index a0e7b0a..895dc4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ env: - REACT_APP_FAUCET_URI="http://localhost:3001" - REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0" # start Barge with these versions - - BRIZO_VERSION=v0.4.2 + - BRIZO_VERSION=v0.4.4 - AQUARIUS_VERSION=v0.3.8 - KEEPER_VERSION=v0.11.1 - EVENTS_HANDLER_VERSION=v0.1.2 diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index dbdb837..b1ce485 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -36,16 +36,18 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { ) }, [received]) - async function addToIpfs(data: Buffer | ArrayBuffer | File | File[]) { + async function addToIpfs(data: any) { try { const response = await ipfs.add(data, { + wrapWithDirectory: true, progress: (length: number) => { console.log(`Received: ${formatBytes(length, 0)}`) setReceived(length) } }) - console.log(response) - const cid = response[0].hash + + // CID of wrapping directory is returned last + const cid = response[response.length - 1].hash console.log(`File added: ${cid}`) return cid } catch (error) { @@ -55,7 +57,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { } async function handleOnDrop(acceptedFiles: File[]) { - const { size } = acceptedFiles[0] + const { name, size } = acceptedFiles[0] const totalSize = formatBytes(size, 0) setLoading(true) @@ -64,13 +66,18 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { // Add file to IPFS node const content: any = await readFileAsync(acceptedFiles[0]) const data = Buffer.from(content) - const cid = await addToIpfs(data) + const fileDetails = { + path: name, + content: data + } + + const cid = await addToIpfs(fileDetails) if (!cid) return // Ping gateway url to make it globally available, // but store native url in DDO. const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}` - const url = `ipfs://${cid}` + const url = `ipfs://${cid}/${name}` setMessage('Checking IPFS gateway URL') await pingUrl(urlGateway) From c6f5f8561c9e6c59866a8f6783ed6e05bcac1cda Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 18 Sep 2019 14:38:53 +0200 Subject: [PATCH 27/42] update tests --- client/src/hooks/use-ipfs.test.tsx | 22 ++++++ client/src/hooks/use-ipfs.tsx | 78 +++++++++---------- .../routes/Publish/Files/Ipfs/index.test.tsx | 7 +- .../src/routes/Publish/Files/Ipfs/index.tsx | 6 +- .../routes/Publish/Files/Ipfs/utils.test.tsx | 47 ----------- .../src/routes/Publish/Files/Ipfs/utils.tsx | 28 ------- client/src/utils/utils.test.ts | 69 ++++++++++++++++ client/src/utils/utils.ts | 29 +++++++ 8 files changed, 166 insertions(+), 120 deletions(-) create mode 100644 client/src/hooks/use-ipfs.test.tsx delete mode 100644 client/src/routes/Publish/Files/Ipfs/utils.test.tsx delete mode 100644 client/src/routes/Publish/Files/Ipfs/utils.tsx create mode 100644 client/src/utils/utils.test.ts diff --git a/client/src/hooks/use-ipfs.test.tsx b/client/src/hooks/use-ipfs.test.tsx new file mode 100644 index 0000000..a6cc938 --- /dev/null +++ b/client/src/hooks/use-ipfs.test.tsx @@ -0,0 +1,22 @@ +import React from 'react' +import { render, wait } from '@testing-library/react' +import useIpfs from './use-ipfs' + +export default function TestComponent() { + const { ipfsVersion, isIpfsReady, ipfsError, ipfsMessage } = useIpfs() + + return ( +
    + {isIpfsReady && Ready} + {ipfsVersion} - {ipfsMessage} - {ipfsError} +
    + ) +} + +describe('use-ipfs', () => { + it('renders without crashing', async () => { + const { container, getByText } = render() + expect(container.firstChild).toBeInTheDocument() + await wait(() => getByText('Ready')) + }) +}) diff --git a/client/src/hooks/use-ipfs.tsx b/client/src/hooks/use-ipfs.tsx index 8990dda..cfb449b 100644 --- a/client/src/hooks/use-ipfs.tsx +++ b/client/src/hooks/use-ipfs.tsx @@ -13,46 +13,46 @@ export default function useIpfs() { const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) const [ipfsError, setIpfsError] = useState(null) - async function startIpfs() { - ipfsMessage = 'Starting IPFS...' - - if (ipfs) { - console.log('IPFS already started') - // } else if (window.ipfs && window.ipfs.enable) { - // console.log('Found window.ipfs') - // ipfs = await window.ipfs.enable() - } else { - try { - const message = 'IPFS started' - console.time(message) - - ipfs = await Ipfs.create({ - repo: `${os.homedir()}/.jsipfs-${shortid.generate()}`, - config: { - Addresses: { - // 0 for port so system just assigns a new free port - // to allow multiple nodes running at same time - Swarm: ['/ip4/0.0.0.0/tcp/0'] - } - } - }) - console.timeEnd(message) - ipfsMessage = message - - const { agentVersion } = await ipfs.id() - ipfsVersion = agentVersion - } catch (error) { - const message = `IPFS init error: ${error.message}` - ipfsMessage = message - console.error(message) - ipfs = null - setIpfsError(error.message) - } - } - setIpfsReady(Boolean(ipfs)) - } - useEffect(() => { + async function startIpfs() { + ipfsMessage = 'Starting IPFS...' + + if (ipfs) { + console.log('IPFS already started') + // } else if (window.ipfs && window.ipfs.enable) { + // console.log('Found window.ipfs') + // ipfs = await window.ipfs.enable() + } else { + try { + const message = 'IPFS started' + console.time(message) + + ipfs = await Ipfs.create({ + repo: `${os.homedir()}/.jsipfs-${shortid.generate()}`, + config: { + Addresses: { + // 0 for port so system just assigns a new free port + // to allow multiple nodes running at same time + Swarm: ['/ip4/0.0.0.0/tcp/0'] + } + } + }) + console.timeEnd(message) + ipfsMessage = message + + const { agentVersion } = await ipfs.id() + ipfsVersion = agentVersion + } catch (error) { + const message = `IPFS init error: ${error.message}` + ipfsMessage = message + console.error(message) + ipfs = null + setIpfsError(error.message) + } + } + setIpfsReady(Boolean(ipfs)) + } + startIpfs() // just like componentWillUnmount() diff --git a/client/src/routes/Publish/Files/Ipfs/index.test.tsx b/client/src/routes/Publish/Files/Ipfs/index.test.tsx index 403f8df..398686e 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.test.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.test.tsx @@ -21,11 +21,12 @@ describe('Ipfs', () => { // wait for IPFS node await findByText(/Connected to /) - const fileContents = 'file contents' - const file = new Blob([fileContents], { type: 'text/plain' }) + const file = new File(['(⌐□_□)'], 'chucknorris.png', { + type: 'image/png' + }) // drop a file - const dropzoneInput = container.querySelector('input') + const dropzoneInput = container.querySelector('.dropzone input') dropzoneInput && fireEvent.change(dropzoneInput, { target: [file] }) }) }) diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index b1ce485..c6f48b1 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -1,12 +1,10 @@ /* eslint-disable no-console */ - import React, { useState, useEffect } from 'react' import useIpfsApi from '../../../../hooks/use-ipfs-api' import Label from '../../../../components/atoms/Form/Label' import Spinner from '../../../../components/atoms/Spinner' import Dropzone from '../../../../components/molecules/Dropzone' -import { formatBytes } from '../../../../utils/utils' -import { pingUrl, readFileAsync } from './utils' +import { formatBytes, pingUrl, readFileAsync } from '../../../../utils/utils' import { ipfsGatewayUri } from '../../../../config' import styles from './index.module.scss' @@ -57,6 +55,8 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { } async function handleOnDrop(acceptedFiles: File[]) { + if (!acceptedFiles[0]) return + const { name, size } = acceptedFiles[0] const totalSize = formatBytes(size, 0) diff --git a/client/src/routes/Publish/Files/Ipfs/utils.test.tsx b/client/src/routes/Publish/Files/Ipfs/utils.test.tsx deleted file mode 100644 index de8f643..0000000 --- a/client/src/routes/Publish/Files/Ipfs/utils.test.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import mockAxios from 'jest-mock-axios' -import { formatBytes, pingUrl } from './utils' - -const mockResponse = { - status: 200, - data: {} -} - -const mockResponseFaulty = { - status: 404, - statusText: 'Not Found', - data: {} -} - -afterEach(() => { - mockAxios.reset() -}) - -describe('utils', () => { - it('formatBytes outputs as expected', () => { - const number = 1024 - const output = formatBytes(number, 0) - expect(output).toBe('1 KB') - }) - - it('formatBytes 0 conversion', () => { - const number = 0 - const output = formatBytes(number, 0) - expect(output).toBe('0 Bytes') - }) - - it('pingUrl can be called', () => { - pingUrl('https://oceanprotocol.com') - mockAxios.mockResponse(mockResponse) - expect(mockAxios).toHaveBeenCalled() - }) - - it('pingUrl can be called with non 200 response', () => { - pingUrl('https://oceanprotocol.com') - mockAxios.mockResponse(mockResponseFaulty) - }) - - it('pingUrl error catch', () => { - pingUrl('https://oceanprotocol.com') - mockAxios.mockError({ message: 'Error catch' }) - }) -}) diff --git a/client/src/routes/Publish/Files/Ipfs/utils.tsx b/client/src/routes/Publish/Files/Ipfs/utils.tsx deleted file mode 100644 index 24d0efb..0000000 --- a/client/src/routes/Publish/Files/Ipfs/utils.tsx +++ /dev/null @@ -1,28 +0,0 @@ -/* eslint-disable no-console */ -import axios from 'axios' - -export async function pingUrl(url: string) { - try { - const response = await axios(url) - if (response.status !== 200) console.error(`Not found: ${url}`) - - console.log(`File found: ${url}`) - return - } catch (error) { - console.error(error.message) - } -} - -export function readFileAsync(file: File) { - return new Promise((resolve, reject) => { - const reader = new FileReader() - reader.onerror = () => { - reader.abort() - reject(new DOMException('Problem parsing input file.')) - } - reader.onload = () => { - resolve(reader.result) - } - reader.readAsArrayBuffer(file) - }) -} diff --git a/client/src/utils/utils.test.ts b/client/src/utils/utils.test.ts new file mode 100644 index 0000000..73b8623 --- /dev/null +++ b/client/src/utils/utils.test.ts @@ -0,0 +1,69 @@ +import mockAxios from 'jest-mock-axios' +import { formatBytes, pingUrl, arraySum, readFileAsync } from './utils' + +describe('formatBytes', () => { + it('outputs as expected', () => { + const number = 1024 + const output = formatBytes(number, 0) + expect(output).toBe('1 KB') + }) + + it('0 conversion', () => { + const number = 0 + const output = formatBytes(number, 0) + expect(output).toBe('0 Bytes') + }) +}) + +describe('pingUrl', () => { + const mockResponse = { + status: 200, + data: {} + } + + const mockResponseFaulty = { + status: 404, + statusText: 'Not Found', + data: {} + } + + afterEach(() => { + mockAxios.reset() + }) + + it('pingUrl can be called', () => { + pingUrl('https://oceanprotocol.com') + mockAxios.mockResponse(mockResponse) + expect(mockAxios).toHaveBeenCalled() + }) + + it('pingUrl can be called with non 200 response', () => { + pingUrl('https://oceanprotocol.com') + mockAxios.mockResponse(mockResponseFaulty) + }) + + it('pingUrl error catch', () => { + pingUrl('https://oceanprotocol.com') + mockAxios.mockError({ message: 'Error catch' }) + }) +}) + +describe('arraySum', () => { + it('outputs as expected', () => { + const array = [2, 3] + const output = arraySum(array) + expect(output).toBe(5) + }) +}) + +describe('readFileAsync', () => { + it('outputs as expected', async () => { + const file = new File(['ABC'], 'filename.txt', { + type: 'text/plain', + lastModified: Date.now() + }) + + const output = await readFileAsync(file) + expect(output).toBeInstanceOf(ArrayBuffer) + }) +}) diff --git a/client/src/utils/utils.ts b/client/src/utils/utils.ts index d7823a5..9b2e83e 100644 --- a/client/src/utils/utils.ts +++ b/client/src/utils/utils.ts @@ -1,3 +1,6 @@ +/* eslint-disable no-console */ +import axios from 'axios' + export function formatBytes(a: number, b: number) { if (a === 0) return '0 Bytes' const c = 1024 @@ -11,3 +14,29 @@ export function formatBytes(a: number, b: number) { export function arraySum(array: number[]) { return array.reduce((a, b) => a + b, 0) } + +export async function pingUrl(url: string) { + try { + const response = await axios(url) + if (response.status !== 200) console.error(`Not found: ${url}`) + + console.log(`File found: ${url}`) + return + } catch (error) { + console.error(error.message) + } +} + +export function readFileAsync(file: File) { + return new Promise((resolve, reject) => { + const reader = new FileReader() + reader.onerror = () => { + reader.abort() + reject(new DOMException('Problem parsing input file.')) + } + reader.onload = () => { + resolve(reader.result) + } + reader.readAsArrayBuffer(file) + }) +} From 752498d6b36fdae98a63d7c6cfcec1eb74e413f3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 18 Sep 2019 15:54:50 +0200 Subject: [PATCH 28/42] IPFS publish & consume integration tests --- .gitignore | 1 + cypress/integration/1_publish.spec.js | 74 +++++++++++++++++++++++++-- cypress/integration/2_search.spec.js | 4 +- cypress/integration/3_consume.spec.js | 37 ++++++++++++-- cypress/integration/4_faucet.spec.js | 4 +- 5 files changed, 110 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index f0d1969..5132172 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ yarn-error.log* cypress/screenshots cypress/videos cypress/fixtures/did.txt +cypress/fixtures/did-ipfs.txt artifacts diff --git a/cypress/integration/1_publish.spec.js b/cypress/integration/1_publish.spec.js index 000ea74..cab9160 100644 --- a/cypress/integration/1_publish.spec.js +++ b/cypress/integration/1_publish.spec.js @@ -1,6 +1,6 @@ /// -context('Publish', () => { - before(() => { +describe('Publish', () => { + beforeEach(() => { cy.visit('/publish') cy.get('article>div', { timeout: 60000 }).should( @@ -9,7 +9,7 @@ context('Publish', () => { ) }) - it('Publish flow', () => { + it('should publish https:// file', () => { // Fill title cy.get('input#name').type('Commons Integration Test') // Open Add a file form @@ -76,4 +76,72 @@ context('Publish', () => { ) }) }) + + it('should publish ipfs:// file', () => { + // Fill title + cy.get('input#name').type('Commons Integration IPFS Test') + // Open Add a file form + cy.get('button') + .contains('+ From URL') + .click() + // Fill url of file + cy.get('input#url').type( + 'ipfs://QmX5LRpEVocfks9FNDnRoK2imf2fy9mPpP4wfgaDVXWfYD/video.mp4' + ) + // Add file to main form + cy.get('button') + .contains('Add File') + .click() + // Verify and nove to next step + cy.get('button') + .contains('Next →') + .should('not.be.disabled') + .click() + // Verify we are on next step + cy.get('article>div').should('contain', 'Information') + // Fill description + cy.get('textarea#description').type('This is test description') + // Pick category + cy.get('select#categories').select('Biology') + // Verify and move to next step + cy.get('button') + .contains('Next →') + .should('not.be.disabled') + .click() + // Verify we are on next step + cy.get('article>div').should('contain', 'Authorship') + // Fill author + cy.get('input#author').type('Super Author') + // Fill copyright holder + cy.get('input#copyrightHolder').type('Super Copyright Holder') + // Pick author + cy.get('select#license').select('Public Domain') + // Verify and move to next step + cy.get('button') + .contains('Next →') + .should('not.be.disabled') + .click() + // Verify we are on next step + cy.get('article>div').should('contain', 'Register') + // Start publish process + cy.get('button') + .contains('Register asset') + .should('not.be.disabled') + .click() + // Wait for finish + cy.contains('Your asset is published!', { + timeout: 12000 + }).should('be.visible') + + // Store DID + cy.get('a') + .contains('See published asset') + .invoke('attr', 'href') + .then(href => { + cy.writeFile( + 'cypress/fixtures/did-ipfs.txt', + href.replace('/asset/', '') + ) + }) + }) }) diff --git a/cypress/integration/2_search.spec.js b/cypress/integration/2_search.spec.js index 577b9db..e41695f 100644 --- a/cypress/integration/2_search.spec.js +++ b/cypress/integration/2_search.spec.js @@ -1,12 +1,12 @@ /// -context('Search', () => { +describe('Search', () => { before(() => { cy.visit('/') // Wait for end of loading cy.get('button', { timeout: 60000 }).should('have.length', 1) }) - it('Search for assets from homepage', () => { + it('should search for assets from homepage', () => { // Fill search phrase cy.get('input#search').type('Title test') // Start search diff --git a/cypress/integration/3_consume.spec.js b/cypress/integration/3_consume.spec.js index 07f37ef..187dff1 100644 --- a/cypress/integration/3_consume.spec.js +++ b/cypress/integration/3_consume.spec.js @@ -1,6 +1,6 @@ /// -context('Consume', () => { - before(() => { +describe('Consume', () => { + beforeEach(() => { cy.fixture('did').then(did => { cy.visit(`/asset/${did}`) }) @@ -15,7 +15,38 @@ context('Consume', () => { cy.get('button[name="Download"]').should('not.be.disabled') }) - it('Consume asset and check if there is no error', () => { + it('should consume https:// file', () => { + // eslint-disable-next-line + cy.wait(10000) + // Wait for faucet + // Click consume button + cy.get('button[name="Download"]').click() + // Wait consume process to end + cy.get('button[name="Download"]', { timeout: 600000 }).should( + 'contain', + 'Get file' + ) + // check if there is no error + cy.get('article>div').should( + 'not.contain', + '. Sorry about that, can you try again?' + ) + // eslint-disable-next-line + cy.wait(10000) + // wait for file to download before closing browser + // to prevent alert poping up + }) + + it('should consume ipfs:// file', () => { + cy.fixture('did-ipfs').then(did => { + cy.visit(`/asset/${did}`) + }) + + // Alias button selector & wait for end of loading + cy.get('button[name="Download"]', { timeout: 60000 }) + .first() + .should('have.length', 1) + // eslint-disable-next-line cy.wait(10000) // Wait for faucet diff --git a/cypress/integration/4_faucet.spec.js b/cypress/integration/4_faucet.spec.js index 7b44ff1..0581727 100644 --- a/cypress/integration/4_faucet.spec.js +++ b/cypress/integration/4_faucet.spec.js @@ -1,5 +1,5 @@ /// -context('Faucet', () => { +describe('Faucet', () => { before(() => { cy.visit('/faucet') // Wait for end of loading @@ -21,7 +21,7 @@ context('Faucet', () => { .should('not.be.disabled') }) - it('Execute faucet call', () => { + it('should execute faucet call', () => { // Execute call cy.get('@button') .contains('Request ETH') From 1813207772b57dc888fe9d3902852453fe7f62e2 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 18 Sep 2019 18:38:02 +0200 Subject: [PATCH 29/42] fix gateway url ping --- client/src/hooks/use-ipfs-api.tsx | 2 +- .../index.module.scss => Ipfs.module.scss} | 2 +- .../{Ipfs/index.test.tsx => Ipfs.test.tsx} | 2 +- .../Publish/Files/{Ipfs/index.tsx => Ipfs.tsx} | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) rename client/src/routes/Publish/Files/{Ipfs/index.module.scss => Ipfs.module.scss} (96%) rename client/src/routes/Publish/Files/{Ipfs/index.test.tsx => Ipfs.test.tsx} (97%) rename client/src/routes/Publish/Files/{Ipfs/index.tsx => Ipfs.tsx} (85%) diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index 40fb24f..f15b277 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -7,7 +7,7 @@ let ipfs: any = null let ipfsMessage = '' let ipfsVersion = '' -interface IpfsConfig { +export interface IpfsConfig { host: string port: string protocol: string diff --git a/client/src/routes/Publish/Files/Ipfs/index.module.scss b/client/src/routes/Publish/Files/Ipfs.module.scss similarity index 96% rename from client/src/routes/Publish/Files/Ipfs/index.module.scss rename to client/src/routes/Publish/Files/Ipfs.module.scss index 7412d24..d71a6b3 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.module.scss +++ b/client/src/routes/Publish/Files/Ipfs.module.scss @@ -1,4 +1,4 @@ -@import '../../../../styles/variables'; +@import '../../../styles/variables'; .ipfsForm { margin-top: $spacer / 2; diff --git a/client/src/routes/Publish/Files/Ipfs/index.test.tsx b/client/src/routes/Publish/Files/Ipfs.test.tsx similarity index 97% rename from client/src/routes/Publish/Files/Ipfs/index.test.tsx rename to client/src/routes/Publish/Files/Ipfs.test.tsx index 398686e..791a79b 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.test.tsx +++ b/client/src/routes/Publish/Files/Ipfs.test.tsx @@ -1,6 +1,6 @@ import React from 'react' import { render, fireEvent } from '@testing-library/react' -import Ipfs from '.' +import Ipfs from './Ipfs' const addFile = jest.fn() diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs.tsx similarity index 85% rename from client/src/routes/Publish/Files/Ipfs/index.tsx rename to client/src/routes/Publish/Files/Ipfs.tsx index c6f48b1..bd29ce8 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs.tsx @@ -1,14 +1,14 @@ /* eslint-disable no-console */ import React, { useState, useEffect } from 'react' -import useIpfsApi from '../../../../hooks/use-ipfs-api' -import Label from '../../../../components/atoms/Form/Label' -import Spinner from '../../../../components/atoms/Spinner' -import Dropzone from '../../../../components/molecules/Dropzone' -import { formatBytes, pingUrl, readFileAsync } from '../../../../utils/utils' -import { ipfsGatewayUri } from '../../../../config' -import styles from './index.module.scss' +import useIpfsApi, { IpfsConfig } from '../../../hooks/use-ipfs-api' +import Label from '../../../components/atoms/Form/Label' +import Spinner from '../../../components/atoms/Spinner' +import Dropzone from '../../../components/molecules/Dropzone' +import { formatBytes, pingUrl, readFileAsync } from '../../../utils/utils' +import { ipfsGatewayUri } from '../../../config' +import styles from './Ipfs.module.scss' -const config = { +const config: IpfsConfig = { host: 'ipfs.infura.io', port: '5001', protocol: 'https' @@ -76,7 +76,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { // Ping gateway url to make it globally available, // but store native url in DDO. - const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}` + const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}/${name}` const url = `ipfs://${cid}/${name}` setMessage('Checking IPFS gateway URL') From 483cc35de371f957f3168ee6a7479ec906a437f3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 19 Sep 2019 14:48:35 +0200 Subject: [PATCH 30/42] make showing received file size more reliable --- client/src/routes/Publish/Files/Ipfs.tsx | 11 ++++++----- client/src/routes/Publish/Files/Item.module.scss | 5 +++-- client/src/routes/Publish/Files/Item.tsx | 6 +++--- client/src/routes/Publish/Files/index.tsx | 4 ++-- client/src/routes/Publish/index.test.tsx | 7 +------ 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/client/src/routes/Publish/Files/Ipfs.tsx b/client/src/routes/Publish/Files/Ipfs.tsx index bd29ce8..7a6fccb 100644 --- a/client/src/routes/Publish/Files/Ipfs.tsx +++ b/client/src/routes/Publish/Files/Ipfs.tsx @@ -25,14 +25,15 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') - const [received, setReceived] = useState(0) + const [fileSize, setFileSize] = useState('') + const [fileSizeReceived, setFileSizeReceived] = useState('') useEffect(() => { setMessage( `Adding to IPFS
    - ${formatBytes(received, 0)}
    ` + ${fileSizeReceived || 0}/${fileSize}
    ` ) - }, [received]) + }) async function addToIpfs(data: any) { try { @@ -40,7 +41,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { wrapWithDirectory: true, progress: (length: number) => { console.log(`Received: ${formatBytes(length, 0)}`) - setReceived(length) + setFileSizeReceived(formatBytes(length, 0)) } }) @@ -61,7 +62,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { const totalSize = formatBytes(size, 0) setLoading(true) - setMessage(`Adding to IPFS
    0/${totalSize}
    `) + setFileSize(totalSize) // Add file to IPFS node const content: any = await readFileAsync(acceptedFiles[0]) diff --git a/client/src/routes/Publish/Files/Item.module.scss b/client/src/routes/Publish/Files/Item.module.scss index 45771f8..c10db80 100644 --- a/client/src/routes/Publish/Files/Item.module.scss +++ b/client/src/routes/Publish/Files/Item.module.scss @@ -4,8 +4,9 @@ font-size: $font-size-small; display: block; margin-bottom: $spacer / 8; - - // TODO: truncate long urls with ellipsis + overflow-wrap: break-word; + word-wrap: break-word; + word-break: break-all; } .remove { diff --git a/client/src/routes/Publish/Files/Item.tsx b/client/src/routes/Publish/Files/Item.tsx index 8992016..e411801 100644 --- a/client/src/routes/Publish/Files/Item.tsx +++ b/client/src/routes/Publish/Files/Item.tsx @@ -5,7 +5,7 @@ import Dotdotdot from 'react-dotdotdot' const Item = ({ item, - removeItem + removeFile }: { item: { url: string @@ -13,7 +13,7 @@ const Item = ({ contentType: string contentLength: number } - removeItem(): void + removeFile(): void }) => (
  • @@ -36,7 +36,7 @@ const Item = ({ type="button" className={styles.remove} title="Remove item" - onClick={removeItem} + onClick={removeFile} > × diff --git a/client/src/routes/Publish/Files/index.tsx b/client/src/routes/Publish/Files/index.tsx index debc526..3f19135 100644 --- a/client/src/routes/Publish/Files/index.tsx +++ b/client/src/routes/Publish/Files/index.tsx @@ -169,9 +169,9 @@ export default class Files extends PureComponent {
      {files.map((item: any, index: number) => ( this.removeFile(index)} + removeFile={() => this.removeFile(index)} /> ))}
    diff --git a/client/src/routes/Publish/index.test.tsx b/client/src/routes/Publish/index.test.tsx index e1d8f7b..6228a1a 100644 --- a/client/src/routes/Publish/index.test.tsx +++ b/client/src/routes/Publish/index.test.tsx @@ -32,12 +32,7 @@ describe('Publish', () => { From 60a570892b759f65beb0494bc705bc2854b51338 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 20 Sep 2019 13:51:24 +0200 Subject: [PATCH 31/42] more error output in UI --- client/src/hooks/use-ipfs-api.tsx | 4 +- client/src/routes/Publish/Files/Ipfs.test.tsx | 32 ---------- .../Form.module.scss} | 29 +-------- client/src/routes/Publish/Files/Ipfs/Form.tsx | 26 ++++++++ .../Publish/Files/Ipfs/Status.module.scss | 28 +++++++++ .../src/routes/Publish/Files/Ipfs/Status.tsx | 13 ++++ .../routes/Publish/Files/Ipfs/index.test.tsx | 44 ++++++++++++++ .../Files/{Ipfs.tsx => Ipfs/index.tsx} | 59 +++++++------------ .../src/routes/Publish/Files/index.test.tsx | 3 - 9 files changed, 135 insertions(+), 103 deletions(-) delete mode 100644 client/src/routes/Publish/Files/Ipfs.test.tsx rename client/src/routes/Publish/Files/{Ipfs.module.scss => Ipfs/Form.module.scss} (53%) create mode 100644 client/src/routes/Publish/Files/Ipfs/Form.tsx create mode 100644 client/src/routes/Publish/Files/Ipfs/Status.module.scss create mode 100644 client/src/routes/Publish/Files/Ipfs/Status.tsx create mode 100644 client/src/routes/Publish/Files/Ipfs/index.test.tsx rename client/src/routes/Publish/Files/{Ipfs.tsx => Ipfs/index.tsx} (59%) diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index f15b277..f92c998 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -15,7 +15,7 @@ export interface IpfsConfig { export default function useIpfsApi(config: IpfsConfig) { const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) - const [ipfsError, setIpfsError] = useState(null) + const [ipfsError, setIpfsError] = useState('') useEffect(() => { async function initIpfs() { @@ -49,7 +49,7 @@ export default function useIpfsApi(config: IpfsConfig) { ipfs = null ipfsMessage = '' ipfsVersion = '' - setIpfsError(null) + setIpfsError('') } } }, []) diff --git a/client/src/routes/Publish/Files/Ipfs.test.tsx b/client/src/routes/Publish/Files/Ipfs.test.tsx deleted file mode 100644 index 791a79b..0000000 --- a/client/src/routes/Publish/Files/Ipfs.test.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react' -import { render, fireEvent } from '@testing-library/react' -import Ipfs from './Ipfs' - -const addFile = jest.fn() - -describe('Ipfs', () => { - const ui = - - it('renders without crashing', async () => { - const { container, findByText } = render(ui) - expect(container.firstChild).toBeInTheDocument() - - // wait for IPFS node - await findByText(/Connected to /) - }) - - it('files can be dropped', async () => { - const { container, findByText } = render(ui) - - // wait for IPFS node - await findByText(/Connected to /) - - const file = new File(['(⌐□_□)'], 'chucknorris.png', { - type: 'image/png' - }) - - // drop a file - const dropzoneInput = container.querySelector('.dropzone input') - dropzoneInput && fireEvent.change(dropzoneInput, { target: [file] }) - }) -}) diff --git a/client/src/routes/Publish/Files/Ipfs.module.scss b/client/src/routes/Publish/Files/Ipfs/Form.module.scss similarity index 53% rename from client/src/routes/Publish/Files/Ipfs.module.scss rename to client/src/routes/Publish/Files/Ipfs/Form.module.scss index d71a6b3..9e22c1d 100644 --- a/client/src/routes/Publish/Files/Ipfs.module.scss +++ b/client/src/routes/Publish/Files/Ipfs/Form.module.scss @@ -1,4 +1,4 @@ -@import '../../../styles/variables'; +@import '../../../../styles/variables'; .ipfsForm { margin-top: $spacer / 2; @@ -23,30 +23,3 @@ } } } - -.message { - font-size: $font-size-small; - margin-top: $spacer / 2; - color: $brand-grey-light; - - &:before { - content: ''; - width: .5rem; - height: .5rem; - display: inline-block; - background: $green; - border-radius: 50%; - margin-right: $spacer / 4; - margin-bottom: .05rem; - } -} - -.error { - composes: message; - color: $red; - - &:before { - border-radius: 0; - background: $red; - } -} diff --git a/client/src/routes/Publish/Files/Ipfs/Form.tsx b/client/src/routes/Publish/Files/Ipfs/Form.tsx new file mode 100644 index 0000000..c70e86b --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs/Form.tsx @@ -0,0 +1,26 @@ +import React from 'react' +import Label from '../../../../components/atoms/Form/Label' +import Status from './Status' +import styles from './Form.module.scss' + +export default function Form({ + children, + ipfsMessage, + ipfsError, + error +}: { + children: any + ipfsMessage: string + ipfsError?: string + error?: string +}) { + return ( +
    + + {children} + +
    + ) +} diff --git a/client/src/routes/Publish/Files/Ipfs/Status.module.scss b/client/src/routes/Publish/Files/Ipfs/Status.module.scss new file mode 100644 index 0000000..5f39cff --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs/Status.module.scss @@ -0,0 +1,28 @@ +@import '../../../../styles/variables'; + +.message { + font-size: $font-size-small; + margin-top: $spacer / 2; + color: $brand-grey-light; + + &:before { + content: ''; + width: .5rem; + height: .5rem; + display: inline-block; + background: $green; + border-radius: 50%; + margin-right: $spacer / 4; + margin-bottom: .05rem; + } +} + +.error { + composes: message; + color: $red; + + &:before { + border-radius: 0; + background: $red; + } +} diff --git a/client/src/routes/Publish/Files/Ipfs/Status.tsx b/client/src/routes/Publish/Files/Ipfs/Status.tsx new file mode 100644 index 0000000..7475436 --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs/Status.tsx @@ -0,0 +1,13 @@ +import React from 'react' +import styles from './Status.module.scss' + +export default function Status({ + message, + error +}: { + message: string + error?: string +}) { + const classes = error ? styles.error : styles.message + return
    {message}
    +} diff --git a/client/src/routes/Publish/Files/Ipfs/index.test.tsx b/client/src/routes/Publish/Files/Ipfs/index.test.tsx new file mode 100644 index 0000000..9777283 --- /dev/null +++ b/client/src/routes/Publish/Files/Ipfs/index.test.tsx @@ -0,0 +1,44 @@ +import React from 'react' +import { render, fireEvent, waitForElement, act } from '@testing-library/react' +import Ipfs from '.' + +const addFile = jest.fn() + +describe('IPFS', () => { + const ui = + const file = new File(['(⌐□_□)'], 'chucknorris.png', { + type: 'image/png' + }) + + it('HTTP API: files can be dropped', async () => { + const { container, findByText, getByText } = render(ui) + expect(container).toBeInTheDocument() + + // wait for IPFS node + await findByText(/Connected to /) + + // drop a file + const dropzoneInput = container.querySelector('.dropzone') + Object.defineProperty(dropzoneInput, 'files', { value: [file] }) + act(() => { + dropzoneInput && fireEvent.drop(dropzoneInput) + }) + const addingText = await waitForElement(() => getByText(/Adding /)) + expect(addingText).toBeDefined() + }) + + // it('Local Node: files can be dropped', async () => { + // const { debug, container, findByText, getByText } = render( + // + // ) + // expect(container).toBeInTheDocument() + // // wait for IPFS node + // await findByText(/IPFS started/) + // // drop a file + // const dropzoneInput = container.querySelector('.dropzone input') + // Object.defineProperty(dropzoneInput, 'files', { value: [file] }) + // dropzoneInput && fireEvent.drop(dropzoneInput) + // await waitForElement(() => getByText(/File found/), { timeout: 100000 }) + // expect(addFile).toHaveBeenCalledTimes(1) + // }) +}) diff --git a/client/src/routes/Publish/Files/Ipfs.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx similarity index 59% rename from client/src/routes/Publish/Files/Ipfs.tsx rename to client/src/routes/Publish/Files/Ipfs/index.tsx index 7a6fccb..c6cd6ed 100644 --- a/client/src/routes/Publish/Files/Ipfs.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -1,12 +1,11 @@ /* eslint-disable no-console */ import React, { useState, useEffect } from 'react' -import useIpfsApi, { IpfsConfig } from '../../../hooks/use-ipfs-api' -import Label from '../../../components/atoms/Form/Label' -import Spinner from '../../../components/atoms/Spinner' -import Dropzone from '../../../components/molecules/Dropzone' -import { formatBytes, pingUrl, readFileAsync } from '../../../utils/utils' -import { ipfsGatewayUri } from '../../../config' -import styles from './Ipfs.module.scss' +import useIpfsApi, { IpfsConfig } from '../../../../hooks/use-ipfs-api' +import Spinner from '../../../../components/atoms/Spinner' +import Dropzone from '../../../../components/molecules/Dropzone' +import { formatBytes, pingUrl, readFileAsync } from '../../../../utils/utils' +import { ipfsGatewayUri } from '../../../../config' +import Form from './Form' const config: IpfsConfig = { host: 'ipfs.infura.io', @@ -15,34 +14,26 @@ const config: IpfsConfig = { } export default function Ipfs({ addFile }: { addFile(url: string): void }) { - const { - ipfs, - ipfsVersion, - isIpfsReady, - ipfsError, - ipfsMessage - } = useIpfsApi(config) - + const { ipfs, isIpfsReady, ipfsError, ipfsMessage } = useIpfsApi(config) const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') const [fileSize, setFileSize] = useState('') const [fileSizeReceived, setFileSizeReceived] = useState('') + const [error, setError] = useState('') useEffect(() => { setMessage( `Adding to IPFS
    ${fileSizeReceived || 0}/${fileSize}
    ` ) - }) + }, [fileSize, fileSizeReceived]) async function addToIpfs(data: any) { try { const response = await ipfs.add(data, { wrapWithDirectory: true, - progress: (length: number) => { - console.log(`Received: ${formatBytes(length, 0)}`) + progress: (length: number) => setFileSizeReceived(formatBytes(length, 0)) - } }) // CID of wrapping directory is returned last @@ -50,25 +41,26 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { console.log(`File added: ${cid}`) return cid } catch (error) { - console.error(`Adding to IPFS failed: ${error.message}`) + setError(`Adding to IPFS failed: ${error.message}`) setLoading(false) } } - async function handleOnDrop(acceptedFiles: File[]) { + async function handleOnDrop(acceptedFiles: any) { if (!acceptedFiles[0]) return - const { name, size } = acceptedFiles[0] - const totalSize = formatBytes(size, 0) - setLoading(true) + setError('') + + const { path, size } = acceptedFiles[0] + const totalSize = formatBytes(size, 0) setFileSize(totalSize) // Add file to IPFS node const content: any = await readFileAsync(acceptedFiles[0]) const data = Buffer.from(content) const fileDetails = { - path: name, + path, content: data } @@ -77,8 +69,8 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { // Ping gateway url to make it globally available, // but store native url in DDO. - const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}/${name}` - const url = `ipfs://${cid}/${name}` + const urlGateway = `${ipfsGatewayUri}/ipfs/${cid}/${path}` + const url = `ipfs://${cid}/${path}` setMessage('Checking IPFS gateway URL') await pingUrl(urlGateway) @@ -88,10 +80,7 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { } return ( -
    - +
    {loading ? ( ) : ( @@ -101,12 +90,6 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { disabled={!isIpfsReady} /> )} - {ipfsMessage !== '' && ( -
    - {ipfsMessage} -
    - )} - {ipfsError &&
    {ipfsError}
    } -
    + ) } diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index 8f47761..850c3c0 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -74,9 +74,6 @@ describe('Files', () => { await waitForElement(() => getByText('- Cancel')) expect(container.querySelector('.ipfsForm')).toBeInTheDocument() - // wait for IPFS node - await findByText(/Connected to /) - // close fireEvent.click(getByText('- Cancel')) await waitForElement(() => getByText('+ Add to IPFS')) From c63325bdf226c27b03e0c51c1caf789f07f14606 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 23 Sep 2019 17:37:16 +0200 Subject: [PATCH 32/42] useIpfs fixes --- client/src/hooks/use-ipfs.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/hooks/use-ipfs.tsx b/client/src/hooks/use-ipfs.tsx index cfb449b..48d74ef 100644 --- a/client/src/hooks/use-ipfs.tsx +++ b/client/src/hooks/use-ipfs.tsx @@ -11,7 +11,7 @@ let ipfsVersion = '' export default function useIpfs() { const [isIpfsReady, setIpfsReady] = useState(Boolean(ipfs)) - const [ipfsError, setIpfsError] = useState(null) + const [ipfsError, setIpfsError] = useState('') useEffect(() => { async function startIpfs() { @@ -64,7 +64,7 @@ export default function useIpfs() { ipfs = null ipfsMessage = '' ipfsVersion = '' - setIpfsError(null) + setIpfsError('') console.timeEnd('IPFS stopped') } } From e3be76fb951531f1f856dea0e379ea2687f492b3 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 24 Sep 2019 12:20:08 +0200 Subject: [PATCH 33/42] move IPFS config for client & server --- .travis.yml | 6 ++++++ client/.env.local.example | 3 ++- client/src/config.ts | 3 +++ client/src/routes/Publish/Files/Ipfs/Form.tsx | 8 ++++++- .../Publish/Files/Ipfs/Status.module.scss | 14 ++++++++++--- .../src/routes/Publish/Files/Ipfs/Status.tsx | 10 +++++++-- .../src/routes/Publish/Files/Ipfs/index.tsx | 21 ++++++++++++------- server/.env.example | 2 +- server/src/config.ts | 2 +- server/src/routes/UrlCheckRouter.ts | 2 +- 10 files changed, 54 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 895dc4f..13491a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,12 @@ env: - REACT_APP_SECRET_STORE_URI="http://localhost:12001" - REACT_APP_FAUCET_URI="http://localhost:3001" - REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0" + + # IPFS client & server config + - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" + # - REACT_APP_IPFS_NODE_URI="https://ipfs.dev-ocean.com:5050" + - IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" + # start Barge with these versions - BRIZO_VERSION=v0.4.4 - AQUARIUS_VERSION=v0.3.8 diff --git a/client/.env.local.example b/client/.env.local.example index afc8d91..e60bf8f 100644 --- a/client/.env.local.example +++ b/client/.env.local.example @@ -59,4 +59,5 @@ REACT_APP_REPORT_EMAIL="test@example.com" # REACT_APP_SHOW_CHANNELS=true # REACT_APP_ALLOW_PRICING=true # REACT_APP_SHOW_REQUEST_TOKENS_BUTTON=true -# REACT_APP_IPFS_GATEWAY_URI="https://gateway.ipfs.io" +# REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" +# REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:5050" diff --git a/client/src/config.ts b/client/src/config.ts index 9439cab..67809d6 100644 --- a/client/src/config.ts +++ b/client/src/config.ts @@ -38,3 +38,6 @@ export const showRequestTokens = // https://ipfs.github.io/public-gateway-checker/ export const ipfsGatewayUri = process.env.REACT_APP_IPFS_GATEWAY_URI || 'https://gateway.ipfs.io' + +export const ipfsNodeUri = + process.env.REACT_APP_IPFS_NODE_URI || 'https://ipfs.infura.io:5001' diff --git a/client/src/routes/Publish/Files/Ipfs/Form.tsx b/client/src/routes/Publish/Files/Ipfs/Form.tsx index c70e86b..94bba00 100644 --- a/client/src/routes/Publish/Files/Ipfs/Form.tsx +++ b/client/src/routes/Publish/Files/Ipfs/Form.tsx @@ -7,11 +7,13 @@ export default function Form({ children, ipfsMessage, ipfsError, + isIpfsReady, error }: { children: any ipfsMessage: string ipfsError?: string + isIpfsReady: boolean error?: string }) { return ( @@ -20,7 +22,11 @@ export default function Form({ Add File To IPFS {children} - +
  • ) } diff --git a/client/src/routes/Publish/Files/Ipfs/Status.module.scss b/client/src/routes/Publish/Files/Ipfs/Status.module.scss index 5f39cff..2e12931 100644 --- a/client/src/routes/Publish/Files/Ipfs/Status.module.scss +++ b/client/src/routes/Publish/Files/Ipfs/Status.module.scss @@ -10,10 +10,18 @@ width: .5rem; height: .5rem; display: inline-block; - background: $green; + background: $yellow; border-radius: 50%; - margin-right: $spacer / 4; - margin-bottom: .05rem; + margin-right: $spacer / 6; + margin-bottom: .1rem; + } +} + +.success { + composes: message; + + &:before { + background: $green; } } diff --git a/client/src/routes/Publish/Files/Ipfs/Status.tsx b/client/src/routes/Publish/Files/Ipfs/Status.tsx index 7475436..a6c1b8c 100644 --- a/client/src/routes/Publish/Files/Ipfs/Status.tsx +++ b/client/src/routes/Publish/Files/Ipfs/Status.tsx @@ -3,11 +3,17 @@ import styles from './Status.module.scss' export default function Status({ message, - error + error, + isIpfsReady }: { message: string error?: string + isIpfsReady: boolean }) { - const classes = error ? styles.error : styles.message + const classes = isIpfsReady + ? styles.success + : error + ? styles.error + : styles.message return
    {message}
    } diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index c6cd6ed..0a2455d 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -4,17 +4,19 @@ import useIpfsApi, { IpfsConfig } from '../../../../hooks/use-ipfs-api' import Spinner from '../../../../components/atoms/Spinner' import Dropzone from '../../../../components/molecules/Dropzone' import { formatBytes, pingUrl, readFileAsync } from '../../../../utils/utils' -import { ipfsGatewayUri } from '../../../../config' +import { ipfsGatewayUri, ipfsNodeUri } from '../../../../config' import Form from './Form' -const config: IpfsConfig = { - host: 'ipfs.infura.io', - port: '5001', - protocol: 'https' +const { hostname, port, protocol } = new URL(ipfsNodeUri) + +const ipfsConfig: IpfsConfig = { + host: hostname, + port, + protocol: protocol.replace(':', '') } export default function Ipfs({ addFile }: { addFile(url: string): void }) { - const { ipfs, isIpfsReady, ipfsError, ipfsMessage } = useIpfsApi(config) + const { ipfs, isIpfsReady, ipfsError, ipfsMessage } = useIpfsApi(ipfsConfig) const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') const [fileSize, setFileSize] = useState('') @@ -80,7 +82,12 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { } return ( -
    + {loading ? ( ) : ( diff --git a/server/.env.example b/server/.env.example index 53927a2..58cf1cc 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,2 +1,2 @@ SENDGRID_API_KEY='xxx' -IPFS_GATEWAY_URL='https://gateway.ipfs.io' +IPFS_GATEWAY_URI='https://ipfs.dev-ocean.com' diff --git a/server/src/config.ts b/server/src/config.ts index 9f44d55..751b86b 100644 --- a/server/src/config.ts +++ b/server/src/config.ts @@ -3,7 +3,7 @@ import 'dotenv/config' const config = { app: { port: 4000 }, sendgridApiKey: process.env.SENDGRID_API_KEY, - ipfsGatewayUrl: process.env.IPFS_GATEWAY_URL || 'https://gateway.ipfs.io' + ipfsGatewayUri: process.env.IPFS_GATEWAY_URI || 'https://gateway.ipfs.io' } export default config diff --git a/server/src/routes/UrlCheckRouter.ts b/server/src/routes/UrlCheckRouter.ts index 533f18e..39364f5 100644 --- a/server/src/routes/UrlCheckRouter.ts +++ b/server/src/routes/UrlCheckRouter.ts @@ -22,7 +22,7 @@ export class UrlCheckRouter { // map native IPFS URLs to gateway URLs if (url.includes('ipfs://')) { const cid = url.split('ipfs://')[1] - url = `${config.ipfsGatewayUrl}/ipfs/${cid}` + url = `${config.ipfsGatewayUri}/ipfs/${cid}` } request( From 8b312578370df213caf34bb64dd8daae61a3cf40 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Tue, 24 Sep 2019 12:47:00 +0200 Subject: [PATCH 34/42] test fixes --- client/src/routes/Publish/Files/index.test.tsx | 2 +- server/test/api.test.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/routes/Publish/Files/index.test.tsx b/client/src/routes/Publish/Files/index.test.tsx index 850c3c0..1c48d0f 100644 --- a/client/src/routes/Publish/Files/index.test.tsx +++ b/client/src/routes/Publish/Files/index.test.tsx @@ -67,7 +67,7 @@ describe('Files', () => { }) it('new IPFS file form can be opened and closed', async () => { - const { container, getByText, findByText } = renderComponent() + const { container, getByText } = renderComponent() // open fireEvent.click(getByText('+ Add to IPFS')) diff --git a/server/test/api.test.ts b/server/test/api.test.ts index 07b87ae..50bd4a1 100644 --- a/server/test/api.test.ts +++ b/server/test/api.test.ts @@ -25,7 +25,8 @@ describe('POST /api/v1/urlcheck', () => { const response = await request(server) .post('/api/v1/urlcheck') .send({ - url: 'ipfs://QmQfpdcMWnLTXKKW9GPV7NgtEugghgD6HgzSF6gSrp2mL9' + url: + 'ipfs://QmX5LRpEVocfks9FNDnRoK2imf2fy9mPpP4wfgaDVXWfYD/video.mp4' }) expect(response.status).toBe(200) expect(response.body).toBeTruthy() From 4920bae0fad54a5e899b1a5f286e144084f0778b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 7 Oct 2019 13:06:24 +0200 Subject: [PATCH 35/42] api port tweaks --- client/src/hooks/use-ipfs-api.tsx | 2 +- client/src/routes/Publish/Files/Ipfs/index.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index f92c998..4f08752 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -8,9 +8,9 @@ let ipfsMessage = '' let ipfsVersion = '' export interface IpfsConfig { + protocol: string host: string port: string - protocol: string } export default function useIpfsApi(config: IpfsConfig) { diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index 0a2455d..62ca322 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -10,11 +10,13 @@ import Form from './Form' const { hostname, port, protocol } = new URL(ipfsNodeUri) const ipfsConfig: IpfsConfig = { + protocol: protocol.replace(':', ''), host: hostname, - port, - protocol: protocol.replace(':', '') + port: port || '443' } +console.log(ipfsConfig) + export default function Ipfs({ addFile }: { addFile(url: string): void }) { const { ipfs, isIpfsReady, ipfsError, ipfsMessage } = useIpfsApi(ipfsConfig) const [loading, setLoading] = useState(false) From aef52f61c093a724c8ca6c91f23f1e7b3325b3cf Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 7 Oct 2019 15:33:18 +0200 Subject: [PATCH 36/42] IPFS node testing --- .travis.yml | 6 +- client/.env.local.example | 2 +- client/package-lock.json | 132 +++++++++--------- client/src/config.ts | 1 - .../src/routes/Publish/Files/Ipfs/index.tsx | 18 ++- client/tsconfig.json | 2 +- 6 files changed, 79 insertions(+), 82 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13491a8..0291cfe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,9 +28,9 @@ env: - REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0" # IPFS client & server config - - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" - # - REACT_APP_IPFS_NODE_URI="https://ipfs.dev-ocean.com:5050" - - IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" + - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.kretschmann.io" + - REACT_APP_IPFS_NODE_URI="https://ipfs.kretschmann.io:443" + - IPFS_GATEWAY_URI="https://ipfs.kretschmann.io" # start Barge with these versions - BRIZO_VERSION=v0.4.4 diff --git a/client/.env.local.example b/client/.env.local.example index e60bf8f..3f15d84 100644 --- a/client/.env.local.example +++ b/client/.env.local.example @@ -60,4 +60,4 @@ REACT_APP_REPORT_EMAIL="test@example.com" # REACT_APP_ALLOW_PRICING=true # REACT_APP_SHOW_REQUEST_TOKENS_BUTTON=true # REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" -# REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:5050" +# REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443" diff --git a/client/package-lock.json b/client/package-lock.json index 268b424..9417804 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8660,25 +8660,25 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "resolved": false, "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "resolved": false, "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "optional": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "resolved": false, "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "resolved": false, "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "optional": true, "requires": { @@ -8688,13 +8688,13 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "resolved": false, "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "optional": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "resolved": false, "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "optional": true, "requires": { @@ -8704,37 +8704,37 @@ }, "chownr": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "resolved": false, "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "resolved": false, "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "optional": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "resolved": false, "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "optional": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "resolved": false, "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "optional": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "resolved": false, "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "optional": true }, "debug": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "resolved": false, "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "optional": true, "requires": { @@ -8743,25 +8743,25 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "resolved": false, "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "resolved": false, "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "resolved": false, "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "resolved": false, "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "optional": true, "requires": { @@ -8770,13 +8770,13 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "resolved": false, "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "resolved": false, "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "optional": true, "requires": { @@ -8792,7 +8792,7 @@ }, "glob": { "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "resolved": false, "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "optional": true, "requires": { @@ -8806,13 +8806,13 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "resolved": false, "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "optional": true }, "iconv-lite": { "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "resolved": false, "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "optional": true, "requires": { @@ -8821,7 +8821,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "resolved": false, "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "optional": true, "requires": { @@ -8830,7 +8830,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "resolved": false, "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "optional": true, "requires": { @@ -8840,19 +8840,19 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "resolved": false, "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "optional": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "resolved": false, "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "resolved": false, "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "optional": true, "requires": { @@ -8861,13 +8861,13 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "resolved": false, "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "resolved": false, "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "optional": true, "requires": { @@ -8876,13 +8876,13 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": false, "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "optional": true }, "minipass": { "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "resolved": false, "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "optional": true, "requires": { @@ -8892,7 +8892,7 @@ }, "minizlib": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "resolved": false, "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "optional": true, "requires": { @@ -8901,7 +8901,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": false, "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "optional": true, "requires": { @@ -8910,13 +8910,13 @@ }, "ms": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "resolved": false, "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "optional": true }, "needle": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", + "resolved": false, "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "optional": true, "requires": { @@ -8927,7 +8927,7 @@ }, "node-pre-gyp": { "version": "0.12.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", + "resolved": false, "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "optional": true, "requires": { @@ -8945,7 +8945,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "resolved": false, "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "optional": true, "requires": { @@ -8955,13 +8955,13 @@ }, "npm-bundled": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "resolved": false, "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "optional": true }, "npm-packlist": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", + "resolved": false, "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "optional": true, "requires": { @@ -8971,7 +8971,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "resolved": false, "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "optional": true, "requires": { @@ -8983,19 +8983,19 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "resolved": false, "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "resolved": false, "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "resolved": false, "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "optional": true, "requires": { @@ -9004,19 +9004,19 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "resolved": false, "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": false, "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "resolved": false, "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "optional": true, "requires": { @@ -9026,19 +9026,19 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": false, "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "resolved": false, "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "optional": true }, "rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "resolved": false, "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "optional": true, "requires": { @@ -9050,7 +9050,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": false, "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "optional": true } @@ -9058,7 +9058,7 @@ }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "resolved": false, "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "optional": true, "requires": { @@ -9073,7 +9073,7 @@ }, "rimraf": { "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "resolved": false, "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "optional": true, "requires": { @@ -9082,43 +9082,43 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "resolved": false, "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "optional": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "resolved": false, "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "optional": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "resolved": false, "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "optional": true }, "semver": { "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "resolved": false, "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "resolved": false, "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "resolved": false, "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "resolved": false, "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "optional": true, "requires": { @@ -9129,7 +9129,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "resolved": false, "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "optional": true, "requires": { @@ -9138,7 +9138,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "resolved": false, "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "optional": true, "requires": { @@ -9147,13 +9147,13 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "resolved": false, "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "optional": true }, "tar": { "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "resolved": false, "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "optional": true, "requires": { @@ -9168,13 +9168,13 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "resolved": false, "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "optional": true }, "wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "resolved": false, "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "optional": true, "requires": { @@ -9183,13 +9183,13 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "resolved": false, "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "optional": true }, "yallist": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "resolved": false, "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "optional": true } diff --git a/client/src/config.ts b/client/src/config.ts index 67809d6..2d5cb5b 100644 --- a/client/src/config.ts +++ b/client/src/config.ts @@ -38,6 +38,5 @@ export const showRequestTokens = // https://ipfs.github.io/public-gateway-checker/ export const ipfsGatewayUri = process.env.REACT_APP_IPFS_GATEWAY_URI || 'https://gateway.ipfs.io' - export const ipfsNodeUri = process.env.REACT_APP_IPFS_NODE_URI || 'https://ipfs.infura.io:5001' diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index 62ca322..9ab1ac2 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -7,17 +7,15 @@ import { formatBytes, pingUrl, readFileAsync } from '../../../../utils/utils' import { ipfsGatewayUri, ipfsNodeUri } from '../../../../config' import Form from './Form' -const { hostname, port, protocol } = new URL(ipfsNodeUri) - -const ipfsConfig: IpfsConfig = { - protocol: protocol.replace(':', ''), - host: hostname, - port: port || '443' -} - -console.log(ipfsConfig) - export default function Ipfs({ addFile }: { addFile(url: string): void }) { + const { hostname, port, protocol } = new URL(ipfsNodeUri) + + const ipfsConfig: IpfsConfig = { + protocol: protocol.replace(':', ''), + host: hostname, + port: port || '443' + } + const { ipfs, isIpfsReady, ipfsError, ipfsMessage } = useIpfsApi(ipfsConfig) const [loading, setLoading] = useState(false) const [message, setMessage] = useState('') diff --git a/client/tsconfig.json b/client/tsconfig.json index ecfa1c2..2f4d2c3 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -15,5 +15,5 @@ "noEmit": true, "jsx": "preserve" }, - "include": ["src", "config/config.ts"] + "include": ["src"] } From dc0f5c803d155b7176b31987caad2d58477599b1 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Wed, 9 Oct 2019 17:32:40 +0200 Subject: [PATCH 37/42] better error handling --- client/src/hooks/use-ipfs-api.tsx | 10 +++------- client/src/routes/Publish/Files/Ipfs/Status.tsx | 2 +- client/src/routes/Publish/Files/Ipfs/index.tsx | 4 ++-- client/src/utils/utils.ts | 3 ++- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/client/src/hooks/use-ipfs-api.tsx b/client/src/hooks/use-ipfs-api.tsx index 4f08752..b77c147 100644 --- a/client/src/hooks/use-ipfs-api.tsx +++ b/client/src/hooks/use-ipfs-api.tsx @@ -24,18 +24,14 @@ export default function useIpfsApi(config: IpfsConfig) { ipfsMessage = 'Checking IPFS gateway...' try { - const message = `Connected to ${config.host}` - console.time(message) ipfs = await ipfsClient(config) - console.timeEnd(message) - ipfsMessage = message - const version = await ipfs.version() ipfsVersion = version.version + ipfsMessage = `Connected to ${config.host}` } catch (error) { - setIpfsError(error.message) + setIpfsError(`IPFS connection error: ${error.message}`) } - setIpfsReady(Boolean(ipfs)) + setIpfsReady(Boolean(await ipfs.id())) } initIpfs() diff --git a/client/src/routes/Publish/Files/Ipfs/Status.tsx b/client/src/routes/Publish/Files/Ipfs/Status.tsx index a6c1b8c..8101054 100644 --- a/client/src/routes/Publish/Files/Ipfs/Status.tsx +++ b/client/src/routes/Publish/Files/Ipfs/Status.tsx @@ -15,5 +15,5 @@ export default function Status({ : error ? styles.error : styles.message - return
    {message}
    + return
    {error || message}
    } diff --git a/client/src/routes/Publish/Files/Ipfs/index.tsx b/client/src/routes/Publish/Files/Ipfs/index.tsx index 9ab1ac2..e919a89 100644 --- a/client/src/routes/Publish/Files/Ipfs/index.tsx +++ b/client/src/routes/Publish/Files/Ipfs/index.tsx @@ -75,10 +75,10 @@ export default function Ipfs({ addFile }: { addFile(url: string): void }) { const url = `ipfs://${cid}/${path}` setMessage('Checking IPFS gateway URL') - await pingUrl(urlGateway) + const isAvailable = await pingUrl(urlGateway) // add IPFS url to file.url - addFile(url) + isAvailable && addFile(url) } return ( diff --git a/client/src/utils/utils.ts b/client/src/utils/utils.ts index 9b2e83e..bff2f2b 100644 --- a/client/src/utils/utils.ts +++ b/client/src/utils/utils.ts @@ -21,10 +21,11 @@ export async function pingUrl(url: string) { if (response.status !== 200) console.error(`Not found: ${url}`) console.log(`File found: ${url}`) - return + return true } catch (error) { console.error(error.message) } + return false } export function readFileAsync(file: File) { From af8df224cb08e052605090f96c9a730f672a6a47 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 11 Oct 2019 13:09:10 +0200 Subject: [PATCH 38/42] bump IPFS packages --- client/package-lock.json | 1622 ++++++++++++++++++++++++-------------- client/package.json | 4 +- 2 files changed, 1011 insertions(+), 615 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 9417804..123c48c 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1049,9 +1049,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1069,9 +1069,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1084,24 +1084,24 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, "@hapi/boom": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.3.tgz", - "integrity": "sha512-3di+R+BcGS7HKy67Zi6mIga8orf67GdR0ubDEVBG1oqz3y9B70LewsuCMCSvWWLKlI6V1+266zqhYzjMrPGvZw==", + "version": "7.4.11", + "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-7.4.11.tgz", + "integrity": "sha512-VSU/Cnj1DXouukYxxkes4nNJonCnlogHvIff1v1RVoN4xzkKhMXX+GRmb3NyH1iar10I9WFPDv2JPwfH3GaV0A==", "requires": { "@hapi/hoek": "8.x.x" }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1115,9 +1115,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1136,27 +1136,52 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, "@hapi/catbox": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-10.2.2.tgz", - "integrity": "sha512-a4KejaKqDOMdwo/PIYoAaObVMmkfkG3RS85kPqNTTURjWnIV1+rrZ938f6RCz5EbrroKbuNC0bcvAt7lAD5LNg==", + "version": "10.2.3", + "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-10.2.3.tgz", + "integrity": "sha512-kN9hXO4NYyOHW09CXiuj5qW1syc/0XeVOBsNNk0Tz89wWNQE5h21WF+VsfAw3uFR8swn/Wj3YEVBnWqo82m/JQ==", "requires": { "@hapi/boom": "7.x.x", "@hapi/hoek": "8.x.x", - "@hapi/joi": "15.x.x", + "@hapi/joi": "16.x.x", "@hapi/podium": "3.x.x" }, "dependencies": { + "@hapi/address": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", + "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==" + }, "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" + }, + "@hapi/joi": { + "version": "16.1.7", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.7.tgz", + "integrity": "sha512-anaIgnZhNooG3LJLrTFzgGALTiO97zRA1UkvQHm9KxxoSiIzCozB3RCNCpDnfhTJD72QlrHA8nwGmNgpFFCIeg==", + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/topo": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.5.tgz", + "integrity": "sha512-bi9m1jrui9LlvtVdLaHv0DqeOoe+I8dep+nEcTgW6XxJHL3xArQcilYz3tIp0cRC4gWlsVtABK7vNKg4jzEmAA==", + "requires": { + "@hapi/hoek": "8.x.x" + } } } }, @@ -1170,9 +1195,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1185,9 +1210,9 @@ } }, "@hapi/cryptiles": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-4.2.0.tgz", - "integrity": "sha512-P+ioMP1JGhwDOKPRuQls6sT/ln6Fk+Ks6d90mlBi6HcOu5itvdUiFv5Ynq2DvLadPDWaA43lwNxkfZrjE9s2MA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-4.2.1.tgz", + "integrity": "sha512-XoqgKsHK0l/VpqPs+tr6j6vE+VQ3+2bkF2stvttmc7xAOf1oSAwHcJ0tlp/6MxMysktt1IEY0Csy3khKaP9/uQ==", "requires": { "@hapi/boom": "7.x.x" } @@ -1197,10 +1222,15 @@ "resolved": "https://registry.npmjs.org/@hapi/file/-/file-1.0.0.tgz", "integrity": "sha512-Bsfp/+1Gyf70eGtnIgmScvrH8sSypO3TcK3Zf0QdHnzn/ACnAkI6KLtGACmNRPEzzIy+W7aJX5E+1fc9GwIABQ==" }, + "@hapi/formula": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@hapi/formula/-/formula-1.2.0.tgz", + "integrity": "sha512-UFbtbGPjstz0eWHb+ga/GM3Z9EzqKXFWIbSOFURU0A/Gku0Bky4bCk9/h//K2Xr3IrCfjFNhMm4jyZ5dbCewGA==" + }, "@hapi/hapi": { - "version": "18.3.2", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-18.3.2.tgz", - "integrity": "sha512-UJogSyMPe4VFfzjQW5v2ixLvTLZLSfPs1XV/DRnAl2znzsGCaNJI+tgNxjM9lszOjEEkMfxLgoXZadk9exnIxw==", + "version": "18.4.0", + "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-18.4.0.tgz", + "integrity": "sha512-uk9zqknRLcNVQKgrPURm85DqkdroWP8eDRekh/IPoKvC4VjdZSn6EH2eUriOwyud/CldeBS3HDIJ/PtRj3VxDQ==", "requires": { "@hapi/accept": "3.x.x", "@hapi/ammo": "3.x.x", @@ -1223,26 +1253,51 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, "@hapi/heavy": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-6.2.1.tgz", - "integrity": "sha512-uaEyC4AtGCGKt/LLBbdDQxJP1bFAbxiot6n/fwa4kyo6w8ULpXXCh8FxLlJ5mC06lqbAxQv45JyozIB6P4Dsig==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-6.2.2.tgz", + "integrity": "sha512-PY1dCCO6dsze7RlafIRhTaGeyTgVe49A/lSkxbhKGjQ7x46o/OFf7hLiRqTCDh3atcEKf6362EaB3+kTUbCsVA==", "requires": { "@hapi/boom": "7.x.x", "@hapi/hoek": "8.x.x", - "@hapi/joi": "15.x.x" + "@hapi/joi": "16.x.x" }, "dependencies": { + "@hapi/address": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", + "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==" + }, "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" + }, + "@hapi/joi": { + "version": "16.1.7", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.7.tgz", + "integrity": "sha512-anaIgnZhNooG3LJLrTFzgGALTiO97zRA1UkvQHm9KxxoSiIzCozB3RCNCpDnfhTJD72QlrHA8nwGmNgpFFCIeg==", + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/topo": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.5.tgz", + "integrity": "sha512-bi9m1jrui9LlvtVdLaHv0DqeOoe+I8dep+nEcTgW6XxJHL3xArQcilYz3tIp0cRC4gWlsVtABK7vNKg4jzEmAA==", + "requires": { + "@hapi/hoek": "8.x.x" + } } } }, @@ -1252,40 +1307,66 @@ "integrity": "sha512-HOJ20Kc93DkDVvjwHyHawPwPkX44sIrbXazAUDiUXaY2R9JwQGo2PhFfnQtdrsIe4igjG2fPgMra7NYw7qhy0A==" }, "@hapi/inert": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/@hapi/inert/-/inert-5.2.1.tgz", - "integrity": "sha512-kovx94LVcT9jELc+k4xuR+1lsdmimjHKn9SpI/YAXDioO7m4YzksEBSmneH3ZwVWVnl2j66Sfzvs2IweHRxyNA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/@hapi/inert/-/inert-5.2.2.tgz", + "integrity": "sha512-8IaGfAEF8SwZtpdaTq0G3aDPG35ZTfWKjnMNniG2N3kE+qioMsBuImIGxna8TNQ+sYMXYK78aqmvzbQHno8qSQ==", "requires": { "@hapi/ammo": "3.x.x", "@hapi/boom": "7.x.x", "@hapi/bounce": "1.x.x", "@hapi/hoek": "8.x.x", - "@hapi/joi": "15.x.x", + "@hapi/joi": "16.x.x", "lru-cache": "4.1.x" }, "dependencies": { + "@hapi/address": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", + "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==" + }, "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" + }, + "@hapi/joi": { + "version": "16.1.7", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.7.tgz", + "integrity": "sha512-anaIgnZhNooG3LJLrTFzgGALTiO97zRA1UkvQHm9KxxoSiIzCozB3RCNCpDnfhTJD72QlrHA8nwGmNgpFFCIeg==", + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/topo": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.5.tgz", + "integrity": "sha512-bi9m1jrui9LlvtVdLaHv0DqeOoe+I8dep+nEcTgW6XxJHL3xArQcilYz3tIp0cRC4gWlsVtABK7vNKg4jzEmAA==", + "requires": { + "@hapi/hoek": "8.x.x" + } } } }, "@hapi/iron": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-5.1.1.tgz", - "integrity": "sha512-QYfm6nofZ19pIxm8LR0lsANBabrdxqe0vUYKKI+0w9VdCetoove+dxfbLfduVDM72kh/RNOQG6E5/xyI826PcA==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-5.1.4.tgz", + "integrity": "sha512-+ElC+OCiwWLjlJBmm8ZEWjlfzTMQTdgPnU/TsoU5QsktspIWmWi9IU4kU83nH+X/SSya8TP8h8P11Wr5L7dkQQ==", "requires": { "@hapi/b64": "4.x.x", "@hapi/boom": "7.x.x", + "@hapi/bourne": "1.x.x", "@hapi/cryptiles": "4.x.x", "@hapi/hoek": "8.x.x" }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1315,9 +1396,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1331,9 +1412,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1350,41 +1431,96 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, + "@hapi/pinpoint": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@hapi/pinpoint/-/pinpoint-1.0.2.tgz", + "integrity": "sha512-dtXC/WkZBfC5vxscazuiJ6iq4j9oNx1SHknmIr8hofarpKUZKmlUVYVIhNVzIEgK5Wrc4GMHL5lZtt1uS2flmQ==" + }, "@hapi/podium": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-3.4.1.tgz", - "integrity": "sha512-WbwYr5nK+GIrCdgEbN8R7Mh7z+j9AgntOLQ/YQdeLtBp+uScVmW9FoycKdNS5uweO74xwICr28Ob0DU74a2zmg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-3.4.2.tgz", + "integrity": "sha512-g9zlAkRL2uDlnEo64xzEhFLblf4fdL5Z6evAO0wJhdxEvokI/+6ryv7k6uhND481LiLzQz8qTtPYMuhH1hichw==", "requires": { "@hapi/hoek": "8.x.x", - "@hapi/joi": "15.x.x" + "@hapi/joi": "16.x.x" }, "dependencies": { + "@hapi/address": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", + "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==" + }, "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" + }, + "@hapi/joi": { + "version": "16.1.7", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.7.tgz", + "integrity": "sha512-anaIgnZhNooG3LJLrTFzgGALTiO97zRA1UkvQHm9KxxoSiIzCozB3RCNCpDnfhTJD72QlrHA8nwGmNgpFFCIeg==", + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/topo": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.5.tgz", + "integrity": "sha512-bi9m1jrui9LlvtVdLaHv0DqeOoe+I8dep+nEcTgW6XxJHL3xArQcilYz3tIp0cRC4gWlsVtABK7vNKg4jzEmAA==", + "requires": { + "@hapi/hoek": "8.x.x" + } } } }, "@hapi/shot": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-4.1.1.tgz", - "integrity": "sha512-TrsqCyaq24XcdvD0bSi26hjwyQQy5q/nzpasbPNgPLoGnxW3sCWE7ws3ba6dd6Atb8TEh9QBD7mBQDCrMMz2Ig==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-4.1.2.tgz", + "integrity": "sha512-6LeHLjvsq/bQ0R+fhEyr7mqExRGguNTrxFZf5DyKe3CK6pNabiGgYO4JVFaRrLZ3JyuhkS0fo8iiRE2Ql2oA/A==", "requires": { "@hapi/hoek": "8.x.x", - "@hapi/joi": "15.x.x" + "@hapi/joi": "16.x.x" }, "dependencies": { + "@hapi/address": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", + "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==" + }, "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" + }, + "@hapi/joi": { + "version": "16.1.7", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.7.tgz", + "integrity": "sha512-anaIgnZhNooG3LJLrTFzgGALTiO97zRA1UkvQHm9KxxoSiIzCozB3RCNCpDnfhTJD72QlrHA8nwGmNgpFFCIeg==", + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/topo": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.5.tgz", + "integrity": "sha512-bi9m1jrui9LlvtVdLaHv0DqeOoe+I8dep+nEcTgW6XxJHL3xArQcilYz3tIp0cRC4gWlsVtABK7vNKg4jzEmAA==", + "requires": { + "@hapi/hoek": "8.x.x" + } } } }, @@ -1398,16 +1534,16 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, "@hapi/statehood": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-6.1.1.tgz", - "integrity": "sha512-tMfS6B8QdrqTaKRUhHv6Ur7oPK6kcEZcnnvBK4IuaPZA9ma5UsyprTXkzbiB0V+0E56dMg3RabO1SABeZkzy6g==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-6.1.2.tgz", + "integrity": "sha512-pYXw1x6npz/UfmtcpUhuMvdK5kuOGTKcJNfLqdNptzietK2UZH5RzNJSlv5bDHeSmordFM3kGItcuQWX2lj2nQ==", "requires": { "@hapi/boom": "7.x.x", "@hapi/bounce": "1.x.x", @@ -1415,13 +1551,38 @@ "@hapi/cryptiles": "4.x.x", "@hapi/hoek": "8.x.x", "@hapi/iron": "5.x.x", - "@hapi/joi": "15.x.x" + "@hapi/joi": "16.x.x" }, "dependencies": { + "@hapi/address": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.2.tgz", + "integrity": "sha512-O4QDrx+JoGKZc6aN64L04vqa7e41tIiLU+OvKdcYaEMP97UttL0f9GIi9/0A4WAMx0uBd6SidDIhktZhgOcN8Q==" + }, "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" + }, + "@hapi/joi": { + "version": "16.1.7", + "resolved": "https://registry.npmjs.org/@hapi/joi/-/joi-16.1.7.tgz", + "integrity": "sha512-anaIgnZhNooG3LJLrTFzgGALTiO97zRA1UkvQHm9KxxoSiIzCozB3RCNCpDnfhTJD72QlrHA8nwGmNgpFFCIeg==", + "requires": { + "@hapi/address": "^2.1.2", + "@hapi/formula": "^1.2.0", + "@hapi/hoek": "^8.2.4", + "@hapi/pinpoint": "^1.0.2", + "@hapi/topo": "^3.1.3" + } + }, + "@hapi/topo": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.5.tgz", + "integrity": "sha512-bi9m1jrui9LlvtVdLaHv0DqeOoe+I8dep+nEcTgW6XxJHL3xArQcilYz3tIp0cRC4gWlsVtABK7vNKg4jzEmAA==", + "requires": { + "@hapi/hoek": "8.x.x" + } } } }, @@ -1440,9 +1601,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -1475,16 +1636,16 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, "@hapi/wreck": { - "version": "15.0.2", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-15.0.2.tgz", - "integrity": "sha512-D/7sGmx3XxxkaMWHZDKTMai8rIEfIgE+DnoZeKfmxhKGgvIpMu1f8BBmLADbdniccGer79w74IWWdXleNrT1Rw==", + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-15.1.0.tgz", + "integrity": "sha512-tQczYRTTeYBmvhsek/D49En/5khcShaBEmzrAaDjMrFXKJRuF8xA8+tlq1ETLBFwGd6Do6g2OC74rt11kzawzg==", "requires": { "@hapi/boom": "7.x.x", "@hapi/bourne": "1.x.x", @@ -1492,9 +1653,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -2363,6 +2524,38 @@ "lodash.deburr": "^4.1.0" } }, + "@sinonjs/commons": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.6.0.tgz", + "integrity": "sha512-w4/WHG7C4WWFyE5geCieFJF6MZkbW4VAriol5KlmQXpAQdxvV0p26sqNZOW6Qyw6Y0l9K4g+cHvvczR2sEEpqg==", + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/formatio": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", + "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "requires": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==" + }, "@svgr/babel-plugin-add-jsx-attribute": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz", @@ -3092,11 +3285,12 @@ } }, "abstract-leveldown": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.1.1.tgz", - "integrity": "sha512-7fK/KySVqzKIomdhkSWzX4YBQhzkzEMbWSiaB6mSN9e+ZdV3KEeKxia/8xQzCkATA5xnnukdP88cFR0D2FsFXw==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.1.tgz", + "integrity": "sha512-zUgomHedGBCThDkUtc1bfilu2jEhRZ7Dk3RePhtMma/akw7UK2Upm2R5Dd8ynRBEt3uscwbWO0VQNx22/7RtWg==", "requires": { "level-concat-iterator": "~2.0.0", + "level-supports": "~1.0.0", "xtend": "~4.0.0" } }, @@ -3430,6 +3624,11 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=" + }, "array-includes": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", @@ -4281,9 +4480,9 @@ "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "base64id": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz", - "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz", + "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==" }, "batch": { "version": "0.6.1", @@ -4533,9 +4732,9 @@ }, "dependencies": { "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==" + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" } } }, @@ -6522,11 +6721,11 @@ "integrity": "sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw==" }, "deferred-leveldown": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.2.0.tgz", - "integrity": "sha512-E1s224a+nv7nEZQL/s+q4ARzBhsfo3KiEjK3qdvDAvMfWE68GnGsMRYKanoZgYqq+LNgyRMYPzBgEmAXjM2i5g==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", + "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", "requires": { - "abstract-leveldown": "~6.1.0", + "abstract-leveldown": "~6.2.1", "inherits": "^2.0.3" } }, @@ -6618,6 +6817,11 @@ } } }, + "delay": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-4.3.0.tgz", + "integrity": "sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA==" + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -6684,13 +6888,10 @@ "debug": "^2.6.0" } }, - "dicer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/dicer/-/dicer-0.3.0.tgz", - "integrity": "sha512-MdceRRWqltEG2dZqO769g27N/3PXfcKl04VhYnBlo2YhH7zPi88VebsjTKclaOyiuMaGU72hTfw3VkUitGcVCA==", - "requires": { - "streamsearch": "0.1.2" - } + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" }, "diff-sequences": { "version": "24.3.0", @@ -6992,16 +7193,16 @@ } }, "engine.io": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.3.2.tgz", - "integrity": "sha512-AsaA9KG7cWPXWHp5FvHdDWY3AMWeZ8x+2pUVLcn71qE5AtAzgGbxuclOytygskw8XGmiQafTmnI9Bix3uihu2w==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.4.0.tgz", + "integrity": "sha512-XCyYVWzcHnK5cMz7G4VTu2W7zJS7SM1QkcelghyIk/FmobWBtXE7fwhBusEKvCSqc3bMh8fNFMlUkCKTFRxH2w==", "requires": { "accepts": "~1.3.4", - "base64id": "1.0.0", + "base64id": "2.0.0", "cookie": "0.3.1", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.0", - "ws": "~6.1.0" + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", + "ws": "^7.1.2" }, "dependencies": { "cookie": { @@ -7010,32 +7211,37 @@ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "ws": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", - "integrity": "sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.1.2.tgz", + "integrity": "sha512-gftXq3XI81cJCgkUiAVixA0raD9IVmXqsylCrjRygw4+UOOGzPoxnQ6r/CnVL9i+mDncJo94tSkyrtuuQVBmrg==", "requires": { - "async-limiter": "~1.0.0" + "async-limiter": "^1.0.0" } } } }, "engine.io-client": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.3.2.tgz", - "integrity": "sha512-y0CPINnhMvPuwtqXfsGuWE8BB66+B6wTtCofQDRecMQPYX3MYUZXFNKDhdrSe3EVjgOu4V3rxdeqN/Tr91IgbQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.4.0.tgz", + "integrity": "sha512-a4J5QO2k99CM2a0b12IznnyQndoEvtA4UAldhGzKqnHf42I3Qs2W5SPnDvatZRcMaNZs4IevVicBPayxYt6FwA==", "requires": { "component-emitter": "1.2.1", "component-inherit": "0.0.3", - "debug": "~3.1.0", - "engine.io-parser": "~2.1.1", + "debug": "~4.1.0", + "engine.io-parser": "~2.2.0", "has-cors": "1.1.0", "indexof": "0.0.1", "parseqs": "0.0.5", @@ -7051,13 +7257,18 @@ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "ws": { "version": "6.1.4", "resolved": "https://registry.npmjs.org/ws/-/ws-6.1.4.tgz", @@ -7069,9 +7280,9 @@ } }, "engine.io-parser": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz", - "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.0.tgz", + "integrity": "sha512-6I3qD9iUxotsC5HEMuuGsKA0cXerGz+4uGcXQEkfBidgKf0amsjrrtwcbwK/nzpZBxclXlV7gGl9dgWvu4LF6w==", "requires": { "after": "0.8.2", "arraybuffer.slice": "~0.0.7", @@ -8219,14 +8430,14 @@ "dev": true }, "fast-redact": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz", - "integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-2.0.0.tgz", + "integrity": "sha512-zxpkULI9W9MNTK2sJ3BpPQrTEXFNESd2X6O1tXMFpK/XM0G5c5Rll2EVYZH2TqI3xRGK/VaJ+eEOt7pnENJpeA==" }, "fast-safe-stringify": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.6.tgz", - "integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg==" + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==" }, "fast-write-atomic": { "version": "0.2.1", @@ -9274,26 +9485,22 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "bundled": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "bundled": true, "optional": true }, "aproba": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", - "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "bundled": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", - "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "bundled": true, "optional": true, "requires": { "delegates": "^1.0.0", @@ -9302,14 +9509,12 @@ }, "balanced-match": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "bundled": true, "optional": true }, "brace-expansion": { "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "bundled": true, "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -9318,38 +9523,32 @@ }, "chownr": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", - "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", + "bundled": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "bundled": true, "optional": true }, "concat-map": { "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "bundled": true, "optional": true }, "console-control-strings": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "bundled": true, "optional": true }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "bundled": true, "optional": true }, "debug": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "bundled": true, "optional": true, "requires": { "ms": "^2.1.1" @@ -9357,26 +9556,22 @@ }, "deep-extend": { "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "bundled": true, "optional": true }, "delegates": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "bundled": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", - "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", + "bundled": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", - "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", + "bundled": true, "optional": true, "requires": { "minipass": "^2.2.1" @@ -9384,14 +9579,12 @@ }, "fs.realpath": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "bundled": true, "optional": true }, "gauge": { "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "bundled": true, "optional": true, "requires": { "aproba": "^1.0.3", @@ -9406,8 +9599,7 @@ }, "glob": { "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "bundled": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -9420,14 +9612,12 @@ }, "has-unicode": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "bundled": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "bundled": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -9435,8 +9625,7 @@ }, "ignore-walk": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", - "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "bundled": true, "optional": true, "requires": { "minimatch": "^3.0.4" @@ -9444,8 +9633,7 @@ }, "inflight": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "bundled": true, "optional": true, "requires": { "once": "^1.3.0", @@ -9454,20 +9642,17 @@ }, "inherits": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "bundled": true, "optional": true }, "ini": { "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "bundled": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "bundled": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -9475,14 +9660,12 @@ }, "isarray": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "bundled": true, "optional": true }, "minimatch": { "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "bundled": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" @@ -9490,14 +9673,12 @@ }, "minimist": { "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "bundled": true, "optional": true }, "minipass": { "version": "2.3.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", - "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", + "bundled": true, "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -9506,8 +9687,7 @@ }, "minizlib": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", - "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", + "bundled": true, "optional": true, "requires": { "minipass": "^2.2.1" @@ -9515,8 +9695,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "bundled": true, "optional": true, "requires": { "minimist": "0.0.8" @@ -9524,14 +9703,12 @@ }, "ms": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "bundled": true, "optional": true }, "needle": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.1.tgz", - "integrity": "sha512-CaLXV3W8Vnbps8ZANqDGz7j4x7Yj1LW4TWF/TQuDfj7Cfx4nAPTvw98qgTevtto1oHDrh3pQkaODbqupXlsWTg==", + "bundled": true, "optional": true, "requires": { "debug": "^4.1.0", @@ -9541,8 +9718,7 @@ }, "node-pre-gyp": { "version": "0.13.0", - "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.13.0.tgz", - "integrity": "sha512-Md1D3xnEne8b/HGVQkZZwV27WUi1ZRuZBij24TNaZwUPU3ZAFtvT6xxJGaUVillfmMKnn5oD1HoGsp2Ftik7SQ==", + "bundled": true, "optional": true, "requires": { "detect-libc": "^1.0.2", @@ -9559,8 +9735,7 @@ }, "nopt": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", - "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", + "bundled": true, "optional": true, "requires": { "abbrev": "1", @@ -9569,14 +9744,12 @@ }, "npm-bundled": { "version": "1.0.6", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", - "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", + "bundled": true, "optional": true }, "npm-packlist": { "version": "1.4.1", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", - "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", + "bundled": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -9585,8 +9758,7 @@ }, "npmlog": { "version": "4.1.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", - "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "bundled": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -9597,20 +9769,17 @@ }, "number-is-nan": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "bundled": true, "optional": true }, "object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "bundled": true, "optional": true }, "once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "bundled": true, "optional": true, "requires": { "wrappy": "1" @@ -9618,20 +9787,17 @@ }, "os-homedir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "bundled": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "bundled": true, "optional": true }, "osenv": { "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "bundled": true, "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -9640,20 +9806,17 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "bundled": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", + "bundled": true, "optional": true }, "rc": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "bundled": true, "optional": true, "requires": { "deep-extend": "^0.6.0", @@ -9664,16 +9827,14 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "bundled": true, "optional": true } } }, "readable-stream": { "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "bundled": true, "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -9687,8 +9848,7 @@ }, "rimraf": { "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "bundled": true, "optional": true, "requires": { "glob": "^7.1.3" @@ -9696,44 +9856,37 @@ }, "safe-buffer": { "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "bundled": true, "optional": true }, "safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "bundled": true, "optional": true }, "sax": { "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "bundled": true, "optional": true }, "semver": { "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "bundled": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "bundled": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "bundled": true, "optional": true }, "string-width": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "bundled": true, "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -9743,8 +9896,7 @@ }, "string_decoder": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "bundled": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -9752,8 +9904,7 @@ }, "strip-ansi": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "bundled": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -9761,14 +9912,12 @@ }, "strip-json-comments": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "bundled": true, "optional": true }, "tar": { "version": "4.4.8", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", - "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", + "bundled": true, "optional": true, "requires": { "chownr": "^1.1.1", @@ -9782,14 +9931,12 @@ }, "util-deprecate": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "bundled": true, "optional": true }, "wide-align": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "bundled": true, "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -9797,14 +9944,12 @@ }, "wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "bundled": true, "optional": true }, "yallist": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", - "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "bundled": true, "optional": true } } @@ -10161,9 +10306,9 @@ "dev": true }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.3.tgz", + "integrity": "sha512-B0W4A2U1ww3q7VVthTKfh+epHx+q4mCt6iK+zEAzbMBpWQAwxCeKxEGpj/1oQTpzPXDNSOG7hmG14TsISH50yw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -10192,9 +10337,9 @@ }, "dependencies": { "@hapi/hoek": { - "version": "8.2.4", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.2.4.tgz", - "integrity": "sha512-Ze5SDNt325yZvNO7s5C4fXDscjJ6dcqLFXJQ/M7dZRQCewuDj2iDUuBi6jLQt+APbW9RjjVEvLr35FXuOEqjow==" + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.3.0.tgz", + "integrity": "sha512-C0QL9bmgUXTSuf8nDeGrpMjtJG7tPUr8wG6/wxPbP62tGwCwQtdMSJYfESowmY4P3Hn593f+8OzNY5bckcu/LQ==" } } }, @@ -10973,18 +11118,18 @@ "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, "ipfs": { - "version": "0.37.1", - "resolved": "https://registry.npmjs.org/ipfs/-/ipfs-0.37.1.tgz", - "integrity": "sha512-owolbhlcDBxRKlk2buSavzqV1XDN8KR7a4xqfLee5exxWDdI1Z/6OIY3aqlw45RIp5D23zCNqdrEGqKZVo/uiQ==", + "version": "0.38.0", + "resolved": "https://registry.npmjs.org/ipfs/-/ipfs-0.38.0.tgz", + "integrity": "sha512-Yt4bTEqJ32zml6FbTIaEUZS4Wo8MI97Q/fqU3TgbflKln5YEY7nXcr4Y/fzC/2n6jZG7j7XZsP0LFM557WJ+Fw==", "requires": { - "@hapi/ammo": "^3.1.0", + "@hapi/ammo": "^3.1.1", "@hapi/boom": "^7.4.3", - "@hapi/hapi": "^18.3.1", + "@hapi/hapi": "^18.3.2", "@hapi/joi": "^15.0.1", "array-shuffle": "^1.0.1", "async": "^2.6.1", "async-iterator-all": "^1.0.0", - "async-iterator-to-pull-stream": "^1.1.0", + "async-iterator-to-pull-stream": "^1.3.0", "async-iterator-to-stream": "^1.1.0", "base32.js": "~0.1.0", "bignumber.js": "^9.0.0", @@ -10993,7 +11138,6 @@ "bs58": "^4.0.1", "buffer-peek-stream": "^1.0.1", "byteman": "^1.3.5", - "callbackify": "^1.1.0", "cid-tool": "~0.3.0", "cids": "~0.7.1", "class-is": "^1.1.0", @@ -11002,27 +11146,28 @@ "debug": "^4.1.0", "dlv": "^1.1.3", "err-code": "^2.0.0", + "explain-error": "^1.0.4", "file-type": "^12.0.1", "fnv1a": "^1.0.1", "fsm-event": "^2.1.0", "get-folder-size": "^2.0.0", "glob": "^7.1.3", - "hapi-pino": "^6.0.2", + "hapi-pino": "^6.1.0", "hashlru": "^2.3.0", "human-to-milliseconds": "^2.0.0", "interface-datastore": "~0.6.0", "ipfs-bitswap": "~0.25.1", "ipfs-block": "~0.8.1", "ipfs-block-service": "~0.15.2", - "ipfs-http-client": "^33.1.0", + "ipfs-http-client": "^37.0.1", "ipfs-http-response": "~0.3.1", - "ipfs-mfs": "~0.12.0", - "ipfs-multipart": "~0.1.1", + "ipfs-mfs": "^0.12.2", + "ipfs-multipart": "^0.2.0", "ipfs-repo": "~0.26.6", "ipfs-unixfs": "~0.1.16", "ipfs-unixfs-exporter": "~0.37.7", "ipfs-unixfs-importer": "~0.39.11", - "ipfs-utils": "~0.0.4", + "ipfs-utils": "^0.3.0", "ipld": "~0.24.1", "ipld-bitcoin": "~0.3.0", "ipld-dag-cbor": "~0.15.0", @@ -11037,27 +11182,32 @@ "is-pull-stream": "~0.0.0", "is-stream": "^2.0.0", "iso-url": "~0.4.6", + "it-pipe": "^1.0.1", + "it-to-stream": "^0.1.1", "just-safe-set": "^2.1.0", "kind-of": "^6.0.2", - "libp2p": "~0.25.4", + "libp2p": "~0.26.1", "libp2p-bootstrap": "~0.9.3", "libp2p-crypto": "~0.16.0", "libp2p-delegated-content-routing": "^0.2.4", "libp2p-delegated-peer-routing": "^0.2.4", + "libp2p-floodsub": "^0.18.0", + "libp2p-gossipsub": "~0.0.5", "libp2p-kad-dht": "~0.15.3", "libp2p-keychain": "~0.4.2", "libp2p-mdns": "~0.12.0", "libp2p-record": "~0.6.3", "libp2p-secio": "~0.11.0", - "libp2p-tcp": "~0.13.0", + "libp2p-tcp": "~0.13.1", "libp2p-webrtc-star": "~0.16.0", "libp2p-websocket-star-multi": "~0.4.3", "libp2p-websockets": "~0.12.3", "lodash": "^4.17.15", - "mafmt": "^6.0.2", + "mafmt": "^6.0.10", "merge-options": "^1.0.1", "mime-types": "^2.1.21", "mkdirp": "~0.5.1", + "mortice": "^2.0.0", "multiaddr": "^6.1.0", "multiaddr-to-uri": "^5.0.0", "multibase": "~0.6.0", @@ -11071,6 +11221,7 @@ "progress": "^2.0.1", "prom-client": "^11.5.3", "prometheus-gc-stats": "~0.6.0", + "promise-nodeify": "^3.0.1", "promisify-es6": "^1.0.3", "protons": "^1.0.1", "pull-abortable": "^4.1.1", @@ -11120,6 +11271,15 @@ "readable-stream": "^3.0.1" } }, + "buffer": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", + "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -11164,31 +11324,58 @@ "locate-path": "^3.0.0" } }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" }, "ipfs-http-client": { - "version": "33.1.1", - "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-33.1.1.tgz", - "integrity": "sha512-iwtLL3lOIzxXJFwLnOEtFUv1cYTuWJ0NauD7rpMEd/y4C7z6fuN6TSF4h547lxMh7sJWv+6Z0PmOA5N8FzUHJw==", + "version": "37.0.3", + "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-37.0.3.tgz", + "integrity": "sha512-yv8lVWGUWcAX5K1K5gj0uWjIBmvbS0hIhnStC4Da+RTJL09jFj9LsBYySst8F3pmU6XfqOurwihlFmK79ZChyg==", "requires": { + "abort-controller": "^3.0.0", "async": "^2.6.1", + "async-iterator-all": "^1.0.0", + "async-iterator-to-pull-stream": "^1.3.0", "bignumber.js": "^9.0.0", "bl": "^3.0.0", "bs58": "^4.0.1", - "buffer": "^5.2.1", + "buffer": "^5.4.2", "cids": "~0.7.1", "concat-stream": "github:hugomrdias/concat-stream#feat/smaller", "debug": "^4.1.0", + "delay": "^4.3.0", "detect-node": "^2.0.4", "end-of-stream": "^1.4.1", - "err-code": "^1.1.2", + "err-code": "^2.0.0", + "explain-error": "^1.0.4", "flatmap": "0.0.3", + "form-data": "^2.5.1", + "fs-extra": "^8.1.0", "glob": "^7.1.3", "ipfs-block": "~0.8.1", - "ipfs-utils": "~0.0.3", + "ipfs-utils": "^0.4.0", "ipld-dag-cbor": "~0.15.0", "ipld-dag-pb": "~0.17.3", "ipld-raw": "^4.0.0", @@ -11197,21 +11384,29 @@ "is-stream": "^2.0.0", "iso-stream-http": "~0.1.2", "iso-url": "~0.4.6", + "it-glob": "0.0.4", + "it-to-stream": "^0.1.1", + "iterable-ndjson": "^1.1.0", "just-kebab-case": "^1.1.0", "just-map-keys": "^1.1.0", "kind-of": "^6.0.2", + "ky": "^0.14.0", + "ky-universal": "^0.3.0", "lru-cache": "^5.1.1", + "merge-options": "^1.0.1", "multiaddr": "^6.0.6", "multibase": "~0.6.0", "multicodec": "~0.5.1", "multihashes": "~0.4.14", "ndjson": "github:hugomrdias/ndjson#feat/readable-stream3", "once": "^1.4.0", - "peer-id": "~0.12.2", + "peer-id": "~0.12.3", "peer-info": "~0.15.1", + "promise-nodeify": "^3.0.1", "promisify-es6": "^1.0.3", "pull-defer": "~0.2.3", "pull-stream": "^3.6.9", + "pull-stream-to-async-iterator": "^1.0.2", "pull-to-stream": "~0.1.1", "pump": "^3.0.0", "qs": "^6.5.2", @@ -11221,10 +11416,23 @@ "through2": "^3.0.1" }, "dependencies": { - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" + "ipfs-utils": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.4.0.tgz", + "integrity": "sha512-JLFmCcA058knmYiSB+WBw6nxcDHFS6p05weQOTFR/edufYot0UpgsJTcoMd1fHMq81n0nciJ3QQBqLcJxqGqhA==", + "requires": { + "buffer": "^5.2.1", + "err-code": "^2.0.0", + "fs-extra": "^8.1.0", + "is-buffer": "^2.0.3", + "is-electron": "^2.2.0", + "is-pull-stream": "0.0.0", + "is-stream": "^2.0.0", + "it-glob": "0.0.4", + "kind-of": "^6.0.2", + "pull-stream-to-async-iterator": "^1.0.2", + "readable-stream": "^3.4.0" + } } } }, @@ -11238,6 +11446,14 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -11339,9 +11555,9 @@ "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" }, "yargs": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.0.0.tgz", - "integrity": "sha512-ssa5JuRjMeZEUjg7bEL99AwpitxU/zWGAGpdj0di41pOEmJti8NR6kyUIJBkR78DTYNPZOU08luUo0GTHuB+ow==", + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.0.tgz", + "integrity": "sha512-/is78VKbKs70bVZH7w4YaZea6xcJWOAwkhbR0CFuZBmYtfTYF0xjGJF43AYd8g2Uii1yJwmS5GR2vBmrc32sbg==", "requires": { "cliui": "^5.0.0", "decamelize": "^1.2.0", @@ -11353,13 +11569,13 @@ "string-width": "^3.0.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^13.1.1" + "yargs-parser": "^15.0.0" } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.0.tgz", + "integrity": "sha512-xLTUnCMc4JhxrPEPUYD5IBR1mWCK/aT6+RJ/K29JY2y1vD+FhtgKK0AXRWvI262q3QSffAQuTouFIKUuHX89wQ==", "requires": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" @@ -11461,9 +11677,9 @@ } }, "ipfs-http-client": { - "version": "35.1.0", - "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-35.1.0.tgz", - "integrity": "sha512-C2726d79vydHRc1GdwIWsWnm29zhV568pmQdNru63StXdaDWeijexL4BwcLQi18/JPudT4s9iLTYU1ixIJIHCQ==", + "version": "38.2.0", + "resolved": "https://registry.npmjs.org/ipfs-http-client/-/ipfs-http-client-38.2.0.tgz", + "integrity": "sha512-fREBfEKJGb0egN10NTjwSiz2HQ+e6RKRcqtL+mlzlmrt8o2jzYSHhizVvv5yPZcQ+2WmEUf1d9WJGXO+S6KY9A==", "requires": { "abort-controller": "^3.0.0", "async": "^2.6.1", @@ -11473,20 +11689,23 @@ "bl": "^3.0.0", "bs58": "^4.0.1", "buffer": "^5.4.2", + "callbackify": "^1.1.0", "cids": "~0.7.1", "concat-stream": "github:hugomrdias/concat-stream#feat/smaller", "debug": "^4.1.0", + "delay": "^4.3.0", "detect-node": "^2.0.4", "end-of-stream": "^1.4.1", "err-code": "^2.0.0", "explain-error": "^1.0.4", "flatmap": "0.0.3", + "form-data": "^2.5.1", "fs-extra": "^8.1.0", "glob": "^7.1.3", "ipfs-block": "~0.8.1", - "ipfs-utils": "^0.1.0", + "ipfs-utils": "^0.4.0", "ipld-dag-cbor": "~0.15.0", - "ipld-dag-pb": "~0.17.3", + "ipld-dag-pb": "^0.18.1", "ipld-raw": "^4.0.0", "is-ipfs": "~0.6.1", "is-pull-stream": "0.0.0", @@ -11499,9 +11718,10 @@ "just-kebab-case": "^1.1.0", "just-map-keys": "^1.1.0", "kind-of": "^6.0.2", - "ky": "^0.13.0", + "ky": "^0.14.0", "ky-universal": "^0.3.0", "lru-cache": "^5.1.1", + "merge-options": "^1.0.1", "multiaddr": "^6.0.6", "multibase": "~0.6.0", "multicodec": "~0.5.1", @@ -11541,9 +11761,9 @@ } }, "buffer": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.2.tgz", - "integrity": "sha512-iy9koArjAFCzGnx3ZvNA6Z0clIbbFgbdWQ0mKD3hO0krOrZh8UgA6qMKcZvwLJxS+D6iVR76+5/pV56yMNYTag==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", + "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4" @@ -11565,6 +11785,16 @@ "ms": "^2.1.1" } }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "fs-extra": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", @@ -11576,9 +11806,9 @@ } }, "ipfs-utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.1.0.tgz", - "integrity": "sha512-ukL46N8nxURmTAWC2fUKPLFaHQEvCuMn6mrM/6izEbthB6TCkFTqmUl/dhx5cRJFkYOUTvBzKNo9dnvo+8oAwQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.4.0.tgz", + "integrity": "sha512-JLFmCcA058knmYiSB+WBw6nxcDHFS6p05weQOTFR/edufYot0UpgsJTcoMd1fHMq81n0nciJ3QQBqLcJxqGqhA==", "requires": { "buffer": "^5.2.1", "err-code": "^2.0.0", @@ -11593,11 +11823,29 @@ "readable-stream": "^3.4.0" } }, + "ipld-dag-pb": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/ipld-dag-pb/-/ipld-dag-pb-0.18.1.tgz", + "integrity": "sha512-YU2k7kfhV9uliVCAdIyJkYnTLNMdc4FyM2q2dZjfvegdzJFw5Ts8IHnMU77CCLIyD2cc/3xvf9dLIzMIBZpV1A==", + "requires": { + "cids": "~0.7.1", + "class-is": "^1.1.0", + "multicodec": "~0.5.5", + "multihashing-async": "~0.7.0", + "protons": "^1.0.1", + "stable": "~0.1.8" + } + }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, + "js-sha3": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.8.0.tgz", + "integrity": "sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==" + }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -11619,6 +11867,26 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, + "multihashing-async": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/multihashing-async/-/multihashing-async-0.7.0.tgz", + "integrity": "sha512-SCbfl3f+DzJh+/5piukga9ofIOxwfT05t8R4jfzZIJ88YE9zU9+l3K2X+XB19MYyxqvyK9UJRNWbmQpZqQlbRA==", + "requires": { + "blakejs": "^1.1.0", + "buffer": "^5.2.1", + "err-code": "^1.1.2", + "js-sha3": "~0.8.0", + "multihashes": "~0.4.13", + "murmurhash3js-revisited": "^3.0.0" + }, + "dependencies": { + "err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" + } + } + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -11751,15 +12019,6 @@ "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" }, - "ipfs-multipart": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.2.0.tgz", - "integrity": "sha512-pDCr7xtOW7KCqgeGmejfWjm5xPH516Kx4OU/PdbtIZu68/cFPW4jftJy9idQHdf0C/NnKHnqntMY93rbc+qrQg==", - "requires": { - "@hapi/content": "^4.1.0", - "it-multipart": "~0.0.2" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -11768,12 +12027,12 @@ } }, "ipfs-multipart": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.1.1.tgz", - "integrity": "sha512-NAmCxgBkZ0usWXf8lMwYYEXvyzrqa65uy/1caVKm5yOKFoqXNrNOt4Ev99Pb+B0RMRqGSdfSvtnZM1cfhSSk2A==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ipfs-multipart/-/ipfs-multipart-0.2.0.tgz", + "integrity": "sha512-pDCr7xtOW7KCqgeGmejfWjm5xPH516Kx4OU/PdbtIZu68/cFPW4jftJy9idQHdf0C/NnKHnqntMY93rbc+qrQg==", "requires": { "@hapi/content": "^4.1.0", - "dicer": "~0.3.0" + "it-multipart": "~0.0.2" } }, "ipfs-repo": { @@ -11920,24 +12179,46 @@ } }, "ipfs-utils": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.0.4.tgz", - "integrity": "sha512-7cZf6aGj2FG3XJWhCNwn4mS93Q0GEWjtBZvEHqzgI43U2qzNDCyzfS1pei1Y5F+tw/zDJ5U4XG0G9reJxR53Ig==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.3.0.tgz", + "integrity": "sha512-5xrOYv27lA8gV13K6Zm8gIUvNtqwmHCqztxnVE4S6aTdfMNkXQJJhRvlsi7RN/auHMORPxc3qSRMukgEUO3C2Q==", "requires": { "buffer": "^5.2.1", + "err-code": "^2.0.0", + "fs-extra": "^8.1.0", "is-buffer": "^2.0.3", "is-electron": "^2.2.0", "is-pull-stream": "0.0.0", "is-stream": "^2.0.0", + "it-glob": "0.0.4", "kind-of": "^6.0.2", + "pull-stream-to-async-iterator": "^1.0.2", "readable-stream": "^3.4.0" }, "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, "readable-stream": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", @@ -12752,9 +13033,34 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "iso-random-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.0.tgz", - "integrity": "sha512-ywSWt0KrWcsaK0jVoVJIR30rLyjg9Rw3k2Sm/qp+3tdtSV0SNH7L7KilKnENcENOSoJxDFvpt2idvuMMQohdCQ==" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/iso-random-stream/-/iso-random-stream-1.1.1.tgz", + "integrity": "sha512-YEt/7xOwTdu4KXIgtdgGFkiLUsBaddbnkmHyaFdjJYIcD7V4gpQHPvYC5tyh3kA0PQ01y9lWm1ruVdf8Mqzovg==", + "requires": { + "buffer": "^5.4.3", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "buffer": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.4.3.tgz", + "integrity": "sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "readable-stream": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } }, "iso-stream-http": { "version": "0.1.2", @@ -12988,6 +13294,11 @@ "parse-headers": "^2.0.2" } }, + "it-pipe": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-1.0.1.tgz", + "integrity": "sha512-clx7NMIf4eXe3rp4dKLmT5vMYv/hvZv4lNi1/xx4ZJ8CFmpGod9rTKisyBNBTurbCEa3a7503COankdBj/uUCA==" + }, "it-to-stream": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/it-to-stream/-/it-to-stream-0.1.1.tgz", @@ -14121,6 +14432,11 @@ "resolved": "https://registry.npmjs.org/just-debounce-it/-/just-debounce-it-1.1.0.tgz", "integrity": "sha512-87Nnc0qZKgBZuhFZjYVjSraic0x7zwjhaTMrCKlj0QYKH6lh0KbFzVnfu6LHan03NO7J8ygjeBeD0epejn5Zcg==" }, + "just-extend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", + "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==" + }, "just-kebab-case": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/just-kebab-case/-/just-kebab-case-1.1.0.tgz", @@ -14195,9 +14511,9 @@ "dev": true }, "ky": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/ky/-/ky-0.13.0.tgz", - "integrity": "sha512-qmyUE2IvwLveZEHiLmFzUIrW4EsSX18ItZgEfgx8JXFxSEPKrnXvWrjQDP6zi4mwcie3MWBEHyUg0aNF8OS9oA==" + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.14.0.tgz", + "integrity": "sha512-NSjg+WCElQPdlF3BFZnjh8s5QlMIP+vIGoyukrRU+n+23VBUX87bQYOoG5h3HX5tO7kKQYXvg+QZVt8n0uWmhg==" }, "ky-universal": { "version": "0.3.0", @@ -14321,13 +14637,13 @@ } }, "level-iterator-stream": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.1.tgz", - "integrity": "sha512-pSZWqXK6/yHQkZKCHrR59nKpU5iqorKM22C/BOHTb/cwNQ2EOZG+bovmFFGcOgaBoF3KxqJEI27YwewhJQTzsw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", + "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", "requires": { - "inherits": "^2.0.1", - "readable-stream": "^3.0.2", - "xtend": "^4.0.0" + "inherits": "^2.0.4", + "readable-stream": "^3.4.0", + "xtend": "^4.0.2" }, "dependencies": { "readable-stream": { @@ -14460,6 +14776,14 @@ } } }, + "level-supports": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.0.tgz", + "integrity": "sha512-01PKZumFhgysuHUbRz4c9DyA1egmcHJBAsZbm0Vf5agojC3uWOvAnhOD4swNUgHlfJBymXLi/xkBaEckeNRSvA==", + "requires": { + "xtend": "^4.0.2" + } + }, "level-ws": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", @@ -14506,23 +14830,35 @@ } }, "leveldown": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.2.0.tgz", - "integrity": "sha512-Ml6mWFqhhyUbuJUVaOd6ZVBHA5T0XLOK0cwNRIBEDJCjBiJBM3fpi4gdTIhU5/tWqtxMFMQbmo/U7a9rbA1stg==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.3.0.tgz", + "integrity": "sha512-PQXwTKMz55rYlg7984VbM7xpcqdiWgVKRms2fEgqVL7spd6+wK8NewScJOYIGpIG7/XxMOc0i+q/NX0WLJEcwA==", "requires": { "abstract-leveldown": "~6.1.1", "napi-macros": "~2.0.0", "node-gyp-build": "~4.1.0" + }, + "dependencies": { + "abstract-leveldown": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.1.1.tgz", + "integrity": "sha512-7fK/KySVqzKIomdhkSWzX4YBQhzkzEMbWSiaB6mSN9e+ZdV3KEeKxia/8xQzCkATA5xnnukdP88cFR0D2FsFXw==", + "requires": { + "level-concat-iterator": "~2.0.0", + "xtend": "~4.0.0" + } + } } }, "levelup": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.2.0.tgz", - "integrity": "sha512-TiHUSYrSUQhG7a5MZIKq6ClDcARSvMvSy5GTM8I62tHV5XiWqf+aInF+CAenQKzVRG2s6fufg62Lv8614Extyg==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.3.2.tgz", + "integrity": "sha512-cRTjU4ktWo59wf13PHEiOayHC3n0dOh4i5+FHr4tv4MX9+l7mqETicNq3Aj07HKlLdk0z5muVoDL2RD+ovgiyA==", "requires": { - "deferred-leveldown": "~5.2.0", + "deferred-leveldown": "~5.3.0", "level-errors": "~2.0.0", "level-iterator-stream": "~4.0.0", + "level-supports": "~1.0.0", "xtend": "~4.0.0" } }, @@ -14542,26 +14878,40 @@ } }, "libp2p": { - "version": "0.25.6", - "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.25.6.tgz", - "integrity": "sha512-9K4Blh39qX3r1YdPoGBZX4PxjBFMqQ3i3pkt0SK1q3D0hApyCpCyH/eHXlR+Uh5dBlr1KIoQC8bbH8vF9fMNBA==", + "version": "0.26.2", + "resolved": "https://registry.npmjs.org/libp2p/-/libp2p-0.26.2.tgz", + "integrity": "sha512-AaPSpROjrg17QBMood6tdxLj3yWH5qR/pnQ4gurz3byvYvD6Tw3yt7PQRdSyjOh6Oh+EX06yTrNCnoDTdgliKg==", "requires": { "async": "^2.6.2", + "bignumber.js": "^9.0.0", + "class-is": "^1.1.0", "debug": "^4.1.1", "err-code": "^1.1.2", "fsm-event": "^2.1.0", - "libp2p-connection-manager": "^0.1.0", - "libp2p-floodsub": "^0.16.1", - "libp2p-ping": "^0.8.5", - "libp2p-switch": "^0.42.12", + "hashlru": "^2.3.0", + "interface-connection": "~0.3.3", + "latency-monitor": "~0.2.1", + "libp2p-crypto": "~0.16.1", "libp2p-websockets": "^0.12.2", "mafmt": "^6.0.7", + "merge-options": "^1.0.1", + "moving-average": "^1.0.0", "multiaddr": "^6.1.0", + "multistream-select": "~0.14.6", "once": "^1.4.0", "peer-book": "^0.9.1", "peer-id": "^0.12.2", - "peer-info": "^0.15.1", - "superstruct": "^0.6.0" + "peer-info": "~0.15.1", + "promisify-es6": "^1.0.3", + "protons": "^1.0.1", + "pull-cat": "^1.1.11", + "pull-defer": "~0.2.3", + "pull-handshake": "^1.1.4", + "pull-reader": "^1.3.1", + "pull-stream": "^3.6.9", + "retimer": "^2.0.0", + "superstruct": "^0.6.0", + "xsalsa20": "^1.0.2" }, "dependencies": { "async": { @@ -14628,77 +14978,10 @@ } } }, - "libp2p-circuit": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/libp2p-circuit/-/libp2p-circuit-0.3.7.tgz", - "integrity": "sha512-Z14T3D1YYE1W2k9QtheyxzfwGpEi4Tk4gDofSmAhKqlfCQcctNvKdv0udgjnwzZjXRBtAmNzVJfxZ2WagtZotA==", - "requires": { - "async": "^2.6.2", - "debug": "^4.1.1", - "interface-connection": "~0.3.3", - "mafmt": "^6.0.7", - "multiaddr": "^6.0.6", - "once": "^1.4.0", - "peer-id": "~0.12.2", - "peer-info": "~0.15.1", - "protons": "^1.0.1", - "pull-handshake": "^1.1.4", - "pull-length-prefixed": "^1.3.2", - "pull-pair": "^1.1.0", - "pull-stream": "^3.6.9" - }, - "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "requires": { - "lodash": "^4.17.14" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "libp2p-connection-manager": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/libp2p-connection-manager/-/libp2p-connection-manager-0.1.0.tgz", - "integrity": "sha512-Md5UERlkD+KUsdUQRJE+B+UBq/KwOTo650z8Bl0zEfKjfnv/yMeFhucnf14suYBnzIIdGsckYn66xbeki31BLw==", - "requires": { - "debug": "^4.1.1", - "latency-monitor": "~0.2.1" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, "libp2p-crypto": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.1.tgz", - "integrity": "sha512-+fxqy+cDjwOKK4KTj44WQmjPE5ep2eR5uAIQWHl/+RKvRSor3+RAY53VWkAecgAEvjX2AswxBsoCIJK1Qk5aIQ==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/libp2p-crypto/-/libp2p-crypto-0.16.2.tgz", + "integrity": "sha512-eAml9loxnr5j2uroI3Oy/9oJrVrAPqUSVmcTftkES1p+RMg1uSSfiExCROQJfSde17aKqGzCduQTDrYXpsRhDA==", "requires": { "asmcrypto.js": "^2.3.2", "asn1.js": "^5.0.1", @@ -14710,12 +14993,12 @@ "keypair": "^1.0.1", "libp2p-crypto-secp256k1": "~0.3.0", "multihashing-async": "~0.5.1", - "node-forge": "~0.7.6", + "node-forge": "^0.8.5", "pem-jwk": "^2.0.0", "protons": "^1.0.1", "rsa-pem-to-jwk": "^1.1.3", "tweetnacl": "^1.0.0", - "ursa-optional": "~0.9.10" + "ursa-optional": "~0.10.0" }, "dependencies": { "asn1.js": { @@ -14754,9 +15037,9 @@ } }, "node-forge": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.6.tgz", - "integrity": "sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw==" + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.8.5.tgz", + "integrity": "sha512-vFMQIWt+J/7FLNyKouZ9TazT74PRV3wgv9UT4cRjC8BffxFbKXkgIWR42URCPSnHm/QDz6BOlb2Q0U4+VQT67Q==" }, "tweetnacl": { "version": "1.0.1", @@ -14890,6 +15173,20 @@ "through2": "^3.0.1" } }, + "ipfs-utils": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.0.4.tgz", + "integrity": "sha512-7cZf6aGj2FG3XJWhCNwn4mS93Q0GEWjtBZvEHqzgI43U2qzNDCyzfS1pei1Y5F+tw/zDJ5U4XG0G9reJxR53Ig==", + "requires": { + "buffer": "^5.2.1", + "is-buffer": "^2.0.3", + "is-electron": "^2.2.0", + "is-pull-stream": "0.0.0", + "is-stream": "^2.0.0", + "kind-of": "^6.0.2", + "readable-stream": "^3.4.0" + } + }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -15049,6 +15346,20 @@ "through2": "^3.0.1" } }, + "ipfs-utils": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ipfs-utils/-/ipfs-utils-0.0.4.tgz", + "integrity": "sha512-7cZf6aGj2FG3XJWhCNwn4mS93Q0GEWjtBZvEHqzgI43U2qzNDCyzfS1pei1Y5F+tw/zDJ5U4XG0G9reJxR53Ig==", + "requires": { + "buffer": "^5.2.1", + "is-buffer": "^2.0.3", + "is-electron": "^2.2.0", + "is-pull-stream": "0.0.0", + "is-stream": "^2.0.0", + "kind-of": "^6.0.2", + "readable-stream": "^3.4.0" + } + }, "is-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", @@ -15109,16 +15420,16 @@ } }, "libp2p-floodsub": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/libp2p-floodsub/-/libp2p-floodsub-0.16.1.tgz", - "integrity": "sha512-3Y+BMwlgit5LGKFUwEn5hNH9+WvhK4mkSEKe7mu0xtQ0KmFvwUpYt+UO/By1iZRpYDyEhQ8rya0ZJtYcqFkxvg==", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/libp2p-floodsub/-/libp2p-floodsub-0.18.0.tgz", + "integrity": "sha512-4OihLP5A4LsxNPlfb0mq6vkjAaNu4YxuyYeoj2nNgrRSzr4H8Dz0YtA+DzEDXIgP2RBANSzS+KG9oDeUXDHa/Q==", "requires": { "async": "^2.6.2", "bs58": "^4.0.1", "debug": "^4.1.1", "length-prefixed-stream": "^2.0.0", "libp2p-crypto": "~0.16.1", - "libp2p-pubsub": "~0.1.0", + "libp2p-pubsub": "~0.2.0", "protons": "^1.0.1", "pull-length-prefixed": "^1.3.2", "pull-pushable": "^2.2.0", @@ -15148,17 +15459,66 @@ } } }, - "libp2p-identify": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/libp2p-identify/-/libp2p-identify-0.7.6.tgz", - "integrity": "sha512-QleYqI6f8ah6G6sQU9uaIa9FVOtyp6LtiqopfjrmAIO5Oz22Zw+dpT7FcEXvYP7kL036Es2vzZm0js0pOWw1MA==", + "libp2p-gossipsub": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/libp2p-gossipsub/-/libp2p-gossipsub-0.0.5.tgz", + "integrity": "sha512-7IM9hcSkc7pBWEju/a5ZGcUrEHclgVoUU7XPrMsMB7s5QNXziSbLjJvIBlgU7WOxoTmgmZldEtHPkrsPEb1C9A==", "requires": { - "multiaddr": "^6.0.4", + "async": "^2.6.2", + "err-code": "^1.1.2", + "libp2p-floodsub": "~0.17.1", + "libp2p-pubsub": "~0.2.0", + "multistream-select": "~0.14.6", "peer-id": "~0.12.2", "peer-info": "~0.15.1", "protons": "^1.0.1", - "pull-length-prefixed": "^1.3.1", - "pull-stream": "^3.6.9" + "pull-length-prefixed": "^1.3.3", + "pull-stream": "^3.6.13" + }, + "dependencies": { + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "requires": { + "lodash": "^4.17.14" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "err-code": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", + "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" + }, + "libp2p-floodsub": { + "version": "0.17.2", + "resolved": "https://registry.npmjs.org/libp2p-floodsub/-/libp2p-floodsub-0.17.2.tgz", + "integrity": "sha512-xOljtBcNTerBwRYFnXlJVmTwdYla9YTvBux6HaBE0GvVjPHqOI7gO5WJQ1Nul/7h5qLX5tJqZ4OY5CVn+mcuUQ==", + "requires": { + "async": "^2.6.2", + "bs58": "^4.0.1", + "debug": "^4.1.1", + "length-prefixed-stream": "^2.0.0", + "libp2p-crypto": "~0.16.1", + "libp2p-pubsub": "~0.2.0", + "protons": "^1.0.1", + "pull-length-prefixed": "^1.3.2", + "pull-pushable": "^2.2.0", + "pull-stream": "^3.6.9" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } } }, "libp2p-kad-dht": { @@ -15346,20 +15706,10 @@ } } }, - "libp2p-ping": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/libp2p-ping/-/libp2p-ping-0.8.5.tgz", - "integrity": "sha512-BzCN3+jp1SvJQZlXq2G3TMkyK5UOOf3JO+CZMnaUEHYlRgQf2zShYta5XU2IGx0EJA/23iCdCL+LjBP/DOvbkQ==", - "requires": { - "libp2p-crypto": "~0.16.0", - "pull-handshake": "^1.1.4", - "pull-stream": "^3.6.9" - } - }, "libp2p-pubsub": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/libp2p-pubsub/-/libp2p-pubsub-0.1.0.tgz", - "integrity": "sha512-oppDCIZLmqODAgt1r625yO0j9wy7auro7B6/5bw2WN5ctqTsG791dn3SGVRLV8Dvd7uSfMlOaZ/Bkw8jle0Ytg==", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/libp2p-pubsub/-/libp2p-pubsub-0.2.1.tgz", + "integrity": "sha512-6LFl7b/39LLWKK9v/Oz9F7+c0WX8t2W2Qf2nwyMMCtJDGxC3csvXdhWwUDzBwXx704BJhVgpsVVJ4fXQn5gahg==", "requires": { "async": "^2.6.2", "bs58": "^4.0.1", @@ -15371,6 +15721,7 @@ "pull-length-prefixed": "^1.3.1", "pull-pushable": "^2.2.0", "pull-stream": "^3.6.9", + "sinon": "^7.3.2", "time-cache": "~0.3.0" }, "dependencies": { @@ -15489,68 +15840,10 @@ } } }, - "libp2p-switch": { - "version": "0.42.12", - "resolved": "https://registry.npmjs.org/libp2p-switch/-/libp2p-switch-0.42.12.tgz", - "integrity": "sha512-aNjJQpP9kSClXXKIliSqIowIoxAy0JQ8hnw6BoqOHUIG9Eov4GVyuOdU6lQKl1ym4uKMsnF2G49qpZJ47O01XA==", - "requires": { - "async": "^2.6.2", - "bignumber.js": "^8.1.1", - "class-is": "^1.1.0", - "debug": "^4.1.1", - "err-code": "^1.1.2", - "fsm-event": "^2.1.0", - "hashlru": "^2.3.0", - "interface-connection": "~0.3.3", - "libp2p-circuit": "~0.3.6", - "libp2p-identify": "~0.7.6", - "moving-average": "^1.0.0", - "multiaddr": "^6.0.6", - "multistream-select": "~0.14.4", - "once": "^1.4.0", - "peer-id": "~0.12.2", - "peer-info": "~0.15.1", - "pull-stream": "^3.6.9", - "retimer": "^2.0.0" - }, - "dependencies": { - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "requires": { - "lodash": "^4.17.14" - } - }, - "bignumber.js": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-8.1.1.tgz", - "integrity": "sha512-QD46ppGintwPGuL1KqmwhR0O+N2cZUg8JG/VzwI2e28sM9TqHjQB10lI4QAaMHVbLzwVLLAwEglpKPViWX+5NQ==" - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "err-code": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz", - "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=" - }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, "libp2p-tcp": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/libp2p-tcp/-/libp2p-tcp-0.13.1.tgz", - "integrity": "sha512-gb9C6u+ax11+2ntXnaBPRveb/dyQ36j0dU6FLXcUSIO9ovkWWXduCZC0Fi/Uyc/CZAUYUsu/ACKSvEX+ELS9AQ==", + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/libp2p-tcp/-/libp2p-tcp-0.13.2.tgz", + "integrity": "sha512-TvHLCn25m+UIH+hXTuy8xJDU/Kxj8EEEgWzhWUImsrb/YsYFywjbuv8YCAYtTUMIzyT2DnTtM+xzPxccg/sytw==", "requires": { "class-is": "^1.1.0", "debug": "^4.1.1", @@ -15714,9 +16007,9 @@ } }, "libp2p-websockets": { - "version": "0.12.3", - "resolved": "https://registry.npmjs.org/libp2p-websockets/-/libp2p-websockets-0.12.3.tgz", - "integrity": "sha512-qA5YZv7RoxGUtMlcD8JwquonM0/19MCV0UPDRihCjzTi4wRgGKhIXZSwd/fs+8RRTKHMEUngAxit7ZLSlYgdQQ==", + "version": "0.12.4", + "resolved": "https://registry.npmjs.org/libp2p-websockets/-/libp2p-websockets-0.12.4.tgz", + "integrity": "sha512-wXrdFgBibvuD+b+s1KIvhlbzh/qCXSDBmzkoKUugftxV6tC5AhotbHW1JlcI726+U+z4k8ha3nEZd9PY64NLqQ==", "requires": { "class-is": "^1.1.0", "debug": "^4.1.1", @@ -15945,6 +16238,11 @@ "integrity": "sha512-LoEDv5pgpvWgPF4kNYuIp0qqSJVWak/dML0RY74xlzMZiT9w77teNAwKYKWBTYjlokMirg+o3jBwp+vlLrcfAA==", "dev": true }, + "lolex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==" + }, "long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", @@ -16006,9 +16304,9 @@ "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" }, "mafmt": { - "version": "6.0.8", - "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.8.tgz", - "integrity": "sha512-6oRO2fwNiqXXiby8Anq9ULLQpcrZUsfR3Bs+Yn1DWd/Zd65xGS9fobKzzSsnM9nqUdUA3IggG0b1R3WamVsatA==", + "version": "6.0.10", + "resolved": "https://registry.npmjs.org/mafmt/-/mafmt-6.0.10.tgz", + "integrity": "sha512-FjHDnew6dW9lUu3eYwP0FvvJl9uvNbqfoJM+c1WJcSyutNEIlyu6v3f/rlPnD1cnmue38IjuHlhBdIh3btAiyw==", "requires": { "multiaddr": "^6.1.0" } @@ -16926,6 +17224,33 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "nise": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.2.tgz", + "integrity": "sha512-/6RhOUlicRCbE9s+94qCUsyE+pKlVJ5AhIv+jEE7ESKwnbXqulKZ1FYU+XAtHHWE9TinYvAxDUJAb912PwPoWA==", + "requires": { + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^4.1.0", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "path-to-regexp": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", + "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", + "requires": { + "isarray": "0.0.1" + } + } + } + }, "no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", @@ -17666,9 +17991,9 @@ "integrity": "sha512-qerSRB0p+UDEssxTtm6EDKcE7W4OaoisfIMl4CngyEhjpYglocpNg6UEqCvemdGhosAsg4sO2dXJOdyBifPGCg==" }, "p-timeout": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.1.0.tgz", - "integrity": "sha512-C27DYI+tCroT8J8cTEyySGydl2B7FlxrGNF5/wmMbl1V+jeehUCzEE/BVgzRebdm2K3ZitKOKx8YbdFumDyYmw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", "requires": { "p-finally": "^1.0.0" } @@ -18008,9 +18333,9 @@ } }, "peer-id": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.12.4.tgz", - "integrity": "sha512-AIAwL/6CmVc/VKbUhpA1rY3A/VJ3Z9ELvtvDQfl5cIi0A74L7lvsJ6LxQn5JSJVHM5Us2Ng9zMO523dO3FFnnw==", + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/peer-id/-/peer-id-0.12.5.tgz", + "integrity": "sha512-3xVWrtIvNm9/OPzaQBgXDrfWNx63AftgFQkvqO6YSZy7sP3Fuadwwbn54F/VO9AnpyW/26i0WRQz9FScivXrmw==", "requires": { "async": "^2.6.3", "class-is": "^1.1.0", @@ -18088,12 +18413,12 @@ } }, "pino": { - "version": "5.13.2", - "resolved": "https://registry.npmjs.org/pino/-/pino-5.13.2.tgz", - "integrity": "sha512-WwOSCy36/gWhinsqWqAnuwIi2WtcH+jvoyeLm3bjUALIrzWIst0AovQjK4jVvSN2l64KFPfi3gd2fjsTovjdLQ==", + "version": "5.13.4", + "resolved": "https://registry.npmjs.org/pino/-/pino-5.13.4.tgz", + "integrity": "sha512-heeg8m8FZY8Nl3nuuD+msJUmhamqoGl7JXoTExh9YpGajzz6LYbVByUqrjbf4sCEMYFsqdcqnTJWiSY660DraQ==", "requires": { - "fast-redact": "^1.4.4", - "fast-safe-stringify": "^2.0.6", + "fast-redact": "^2.0.0", + "fast-safe-stringify": "^2.0.7", "flatstr": "^1.0.9", "pino-std-serializers": "^2.3.0", "quick-format-unescaped": "^3.0.2", @@ -18101,18 +18426,18 @@ } }, "pino-pretty": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-3.2.1.tgz", - "integrity": "sha512-PGdcRYw7HCF7ovMhrnepOUmEVh5+tATydRrBICEbP37oRasXV+lo2HA9gg8b7cE7LG6G1OZGVXTZ7MLd946k1Q==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-3.2.2.tgz", + "integrity": "sha512-2SP++Wbo4EsH5RpLhcsYHOR/8CMTIJWZpU0aPiVK0Wq8SrRMQ9oHQNffVK5ZyDFZMtSuTdFCVfLVNFmtFMDEeA==", "requires": { "@hapi/bourne": "^1.3.2", "args": "^5.0.1", "chalk": "^2.4.2", "dateformat": "^3.0.3", - "fast-safe-stringify": "^2.0.6", + "fast-safe-stringify": "^2.0.7", "jmespath": "^0.15.0", "pump": "^3.0.0", - "readable-stream": "^3.3.0", + "readable-stream": "^3.4.0", "split2": "^3.1.1" }, "dependencies": { @@ -19543,9 +19868,9 @@ } }, "pull-split": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/pull-split/-/pull-split-0.2.0.tgz", - "integrity": "sha1-mW0ohTEFIgmoMTiK0NKB3zyCN5Y=", + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/pull-split/-/pull-split-0.2.1.tgz", + "integrity": "sha512-lloBKx+ijuRNvxvhM/SMJQ0r9/0WBGcpCPv8I6MZuYl4D1heUF/eYQObnqVehhtTMYuMwboK7RdhMa4Wg3YB7w==", "requires": { "pull-through": "~1.0.6" } @@ -19715,10 +20040,15 @@ "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==", "dev": true }, + "queue-microtask": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.1.2.tgz", + "integrity": "sha512-F9wwNePtXrzZenAB3ax0Y8TSKGvuB7Qw16J30hspEUTbfUM+H827XyN3rlpwhVmtm5wuZtbKIHjOnwDn7MUxWQ==" + }, "quick-format-unescaped": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz", - "integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz", + "integrity": "sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ==" }, "rabin-wasm": { "version": "0.0.8", @@ -21657,13 +21987,13 @@ "integrity": "sha1-lfUXxPRm18/1YacfydqyWW6p7y4=" }, "simple-peer": { - "version": "9.5.0", - "resolved": "https://registry.npmjs.org/simple-peer/-/simple-peer-9.5.0.tgz", - "integrity": "sha512-3tROq3nBo/CIZI8PWlXGbAxQIlQF6KQ/zcd4lQ2pAC4+rPiV7E721hI22nTO54uw/nzb2HKbvmDtZ4Wr173+vA==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/simple-peer/-/simple-peer-9.6.0.tgz", + "integrity": "sha512-NYqSKPu75xhkZYKGJhCbLCG5kfBtDHf8U9ddk4EKFfYNU7XgIisov+V8wMbVVgyMCfn8pm8uOqQQmE50FPDFWA==", "requires": { "debug": "^4.0.1", "get-browser-rtc": "^1.0.0", - "inherits": "^2.0.1", + "queue-microtask": "^1.1.0", "randombytes": "^2.0.3", "readable-stream": "^3.4.0" }, @@ -21710,6 +22040,20 @@ } } }, + "sinon": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", + "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", + "requires": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.3", + "diff": "^3.5.0", + "lolex": "^4.2.0", + "nise": "^1.5.2", + "supports-color": "^5.5.0" + } + }, "sisteransi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.2.tgz", @@ -21849,16 +22193,16 @@ } }, "socket.io": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.2.0.tgz", - "integrity": "sha512-wxXrIuZ8AILcn+f1B4ez4hJTPG24iNgxBBDaJfT6MsyOhVYiTXWexGoPkd87ktJG8kQEcL/NBvRi64+9k4Kc0w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.3.0.tgz", + "integrity": "sha512-2A892lrj0GcgR/9Qk81EaY2gYhCBxurV0PfmmESO6p27QPrUK1J3zdns+5QPqvUYK2q657nSj0guoIil9+7eFg==", "requires": { "debug": "~4.1.0", - "engine.io": "~3.3.1", + "engine.io": "~3.4.0", "has-binary2": "~1.0.2", "socket.io-adapter": "~1.1.0", - "socket.io-client": "2.2.0", - "socket.io-parser": "~3.3.0" + "socket.io-client": "2.3.0", + "socket.io-parser": "~3.4.0" }, "dependencies": { "debug": { @@ -21882,16 +22226,16 @@ "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs=" }, "socket.io-client": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.2.0.tgz", - "integrity": "sha512-56ZrkTDbdTLmBIyfFYesgOxsjcLnwAKoN4CiPyTVkMQj3zTUh0QAx3GbvIvLpFEOvQWu92yyWICxB0u7wkVbYA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.3.0.tgz", + "integrity": "sha512-cEQQf24gET3rfhxZ2jJ5xzAOo/xhZwK+mOqtGRg5IowZsMgwvHwnf/mCRapAAkadhM26y+iydgwsXGObBB5ZdA==", "requires": { "backo2": "1.0.2", "base64-arraybuffer": "0.1.5", "component-bind": "1.0.0", "component-emitter": "1.2.1", - "debug": "~3.1.0", - "engine.io-client": "~3.3.1", + "debug": "~4.1.0", + "engine.io-client": "~3.4.0", "has-binary2": "~1.0.2", "has-cors": "1.1.0", "indexof": "0.0.1", @@ -21908,22 +22252,57 @@ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" + } + }, + "isarray": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", + "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "socket.io-parser": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", + "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", + "requires": { + "component-emitter": "1.2.1", + "debug": "~3.1.0", + "isarray": "2.0.1" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } } } } }, "socket.io-parser": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.3.0.tgz", - "integrity": "sha512-hczmV6bDgdaEbVqhAeVMM/jfUfzuEZHsQg6eOmLgJht6G3mPKMxYm75w2+qhAQZ+4X+1+ATZ+QFKeOZD5riHng==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.0.tgz", + "integrity": "sha512-/G/VOI+3DBp0+DJKW4KesGnQkQPFmUCbA/oO2QGT6CWxU7hLGWqU3tyuzeSK/dqcyeHsQg1vTe9jiZI8GU9SCQ==", "requires": { "component-emitter": "1.2.1", - "debug": "~3.1.0", + "debug": "~4.1.0", "isarray": "2.0.1" }, "dependencies": { @@ -21933,17 +22312,22 @@ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "isarray": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz", "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4=" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -22026,9 +22410,9 @@ } }, "sonic-boom": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.5.tgz", - "integrity": "sha512-1pKrnAV6RfvntPnarY71tpthFTM3pWZWWQdghZY8ARjtDPGzG/inxqSuRwQY/7V1woUjfyxPb437zn4p5phgnQ==", + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-0.7.6.tgz", + "integrity": "sha512-k9E2QQ4zxuVRLDW+ZW6ISzJs3wlEorVdmM7ApDgor7wsGKSDG5YGHsGmgLY4XYh4DMlr/2ap2BWAE7yTFJtWnQ==", "requires": { "flatstr": "^1.0.12" } @@ -22535,11 +22919,6 @@ "pull-stream": "^3.2.3" } }, - "streamsearch": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-0.1.2.tgz", - "integrity": "sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo=" - }, "strftime": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/strftime/-/strftime-0.10.0.tgz", @@ -23527,6 +23906,11 @@ "prelude-ls": "~1.1.2" } }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" + }, "type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", @@ -23989,12 +24373,19 @@ "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=" }, "ursa-optional": { - "version": "0.9.10", - "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.9.10.tgz", - "integrity": "sha512-RvEbhnxlggX4MXon7KQulTFiJQtLJZpSb9ZSa7ZTkOW0AzqiVTaLjI4vxaSzJBDH9dwZ3ltZadFiBaZslp6haA==", + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/ursa-optional/-/ursa-optional-0.10.1.tgz", + "integrity": "sha512-/pgpBXVJut57dHNrdGF+1/qXi+5B7JrlmZDWPSyoivEcbwFWRZJBJGkWb6ivknMBA3bnFA7lqsb6iHiFfp79QQ==", "requires": { - "bindings": "^1.3.0", - "nan": "^2.11.1" + "bindings": "^1.5.0", + "nan": "^2.14.0" + }, + "dependencies": { + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" + } } }, "use": { @@ -25902,6 +26293,11 @@ "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", "dev": true }, + "xsalsa20": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/xsalsa20/-/xsalsa20-1.0.2.tgz", + "integrity": "sha512-g1DFmZ5JJ9Qzvt4dMw6m9IydqoCSP381ucU5zm46Owbk3bwmqAr8eEJirOPc7PrXRn45drzOpAyDp8jsnoyXyw==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", diff --git a/client/package.json b/client/package.json index ad37219..bfa669a 100644 --- a/client/package.json +++ b/client/package.json @@ -23,8 +23,8 @@ "ethereum-blockies": "github:MyEtherWallet/blockies", "filesize": "^4.1.2", "history": "^4.9.0", - "ipfs": "^0.37.1", - "ipfs-http-client": "^35.1.0", + "ipfs": "^0.38.0", + "ipfs-http-client": "^38.2.0", "is-url-superb": "^3.0.0", "moment": "^2.24.0", "query-string": "^6.8.2", From 4ead855731a3c0c6d5dacaea6cfb2a453da62a1b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 14 Oct 2019 10:26:15 +0200 Subject: [PATCH 39/42] eslint tweaks --- .eslintrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index f2ee15f..4778132 100644 --- a/.eslintrc +++ b/.eslintrc @@ -11,10 +11,11 @@ "extends": [ "oceanprotocol", "oceanprotocol/react", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "plugin:prettier/recommended", "prettier/react", "prettier/standard", - "plugin:prettier/recommended", - "plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint", "plugin:cypress/recommended" ], From 74cb19f5ef923e1ba8fa596b3ea0fdbbe084afec Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 14 Oct 2019 10:55:33 +0200 Subject: [PATCH 40/42] use final IPFS gateway url in server --- .travis.yml | 6 +++--- server/.env.example | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0291cfe..d7c08d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,9 +28,9 @@ env: - REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0" # IPFS client & server config - - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.kretschmann.io" - - REACT_APP_IPFS_NODE_URI="https://ipfs.kretschmann.io:443" - - IPFS_GATEWAY_URI="https://ipfs.kretschmann.io" + - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" + - REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443" + - IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" # start Barge with these versions - BRIZO_VERSION=v0.4.4 diff --git a/server/.env.example b/server/.env.example index 58cf1cc..1bec67a 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,2 +1,2 @@ SENDGRID_API_KEY='xxx' -IPFS_GATEWAY_URI='https://ipfs.dev-ocean.com' +IPFS_GATEWAY_URI='https://ipfs.oceanprotocol.com' From 59ede97931826cc4c4d340bf209a59a224a4417b Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 14 Oct 2019 11:04:22 +0200 Subject: [PATCH 41/42] update docs --- .travis.yml | 6 +++--- README.md | 9 +++++++++ client/.env.local.example | 4 ++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d7c08d6..9b0e4a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,9 +28,9 @@ env: - REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0" # IPFS client & server config - - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" - - REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443" - - IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" + - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" + - REACT_APP_IPFS_NODE_URI="https://ipfs.dev-ocean.com:443" + - IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" # start Barge with these versions - BRIZO_VERSION=v0.4.4 diff --git a/README.md b/README.md index e7f11cd..2f33a0e 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ If you're a developer and want to contribute to, or want to utilize this marketp - [Client](#client) - [Server](#server) - [Feature Switches](#feature-switches) + - [More Settings](#more-settings) - [👩‍🔬 Testing](#-testing) - [Unit Tests](#unit-tests) - [End-to-End Integration Tests](#end-to-end-integration-tests) @@ -144,6 +145,14 @@ Beside configuring the network endpopints, the client allows to activate some fe | `REACT_APP_SHOW_REQUEST_TOKENS_BUTTON` | Shows a second button on the `/faucet` route to request Ocean Tokens in addition to Ether. Will only work in Ocean testnets. | | `REACT_APP_ALLOW_PRICING` | Activate pricing feature. Will show a price input during publish flow, and output prices for each data asset. | +#### More Settings + +| Env Variable | Example | Feature Description | +| --------------------------------------------------------------------- | -------------------------------------- | ------------------------------------------------- | +| client: `REACT_APP_IPFS_GATEWAY_URI`
    server: `IPFS_GATEWAY_URI` | `"https://ipfs.oceanprotocol.com"` | The IPFS gateway URI. | +| `REACT_APP_IPFS_NODE_URI` | `"https://ipfs.oceanprotocol.com:443"` | The IPFS node URI used to add files to IPFS. | +| `REACT_APP_REPORT_EMAIL` | `"jelly@mcjellyfish.com"` | The email used for the _report an asset_ feature. | + ## 👩‍🔬 Testing Test suite is setup with [Jest](https://jestjs.io) and [react-testing-library](https://github.com/kentcdodds/react-testing-library) for unit testing, and [Cypress](https://www.cypress.io) for integration testing. diff --git a/client/.env.local.example b/client/.env.local.example index 3f15d84..a349e66 100644 --- a/client/.env.local.example +++ b/client/.env.local.example @@ -59,5 +59,5 @@ REACT_APP_REPORT_EMAIL="test@example.com" # REACT_APP_SHOW_CHANNELS=true # REACT_APP_ALLOW_PRICING=true # REACT_APP_SHOW_REQUEST_TOKENS_BUTTON=true -# REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" -# REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443" +REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" +REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443" From 4fb47c063b666f37e302e0397bbb6b6fb70a4ed0 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 14 Oct 2019 14:30:31 +0200 Subject: [PATCH 42/42] move travis to ipfs.oceanprotocol.com --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b0e4a5..c6f1b1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,12 +28,12 @@ env: - REACT_APP_BRIZO_ADDRESS="0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0" # IPFS client & server config - - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" - - REACT_APP_IPFS_NODE_URI="https://ipfs.dev-ocean.com:443" - - IPFS_GATEWAY_URI="https://ipfs.dev-ocean.com" + - REACT_APP_IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" + - REACT_APP_IPFS_NODE_URI="https://ipfs.oceanprotocol.com:443" + - IPFS_GATEWAY_URI="https://ipfs.oceanprotocol.com" # start Barge with these versions - - BRIZO_VERSION=v0.4.4 + - BRIZO_VERSION=v0.4.5 - AQUARIUS_VERSION=v0.3.8 - KEEPER_VERSION=v0.11.1 - EVENTS_HANDLER_VERSION=v0.1.2