1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

Merge branch 'master' into feature/compute

This commit is contained in:
Matthias Kretschmann 2020-05-19 11:18:05 +02:00
commit b93f005154
Signed by: m
GPG Key ID: 606EEEF3C479A91F
36 changed files with 86 additions and 539 deletions

View File

@ -62,7 +62,7 @@ export default class Account extends PureComponent<
{isBurner ? (
<button
className={styles.toggle}
onClick={event => this.toggleAccountInfo(event)}
onClick={(event) => this.toggleAccountInfo(event)}
title="Show More Account Info"
>
<Caret

View File

@ -19,9 +19,9 @@ const Indicator = ({
ref={forwardedRef}
>
<User.Consumer>
{user => (
{(user) => (
<Market.Consumer>
{market =>
{(market) =>
!user.isLogged || !market.networkMatch ? (
<span
className={styles.statusIndicatorCloseEnough}

View File

@ -40,7 +40,7 @@ export default class Popover extends PureComponent<{
)}
<Market.Consumer>
{market => (
{(market) => (
<div className={styles.popoverInfoline}>
{network && !market.networkMatch
? `Please connect to Custom RPC

View File

@ -20,7 +20,7 @@ export default class AccountStatus extends PureComponent<
}
private togglePopover() {
this.setState(prevState => ({
this.setState((prevState) => ({
isPopoverOpen: !prevState.isPopoverOpen
}))
}

View File

@ -17,7 +17,7 @@ function mockData(files: any) {
}
function flushPromises(ui: any, container: any) {
return new Promise(resolve =>
return new Promise((resolve) =>
setImmediate(() => {
render(ui, { container })
resolve(container)

View File

@ -12,7 +12,7 @@ export default function Dropzone({
disabled?: boolean
multiple?: boolean
}) {
const onDrop = useCallback(acceptedFiles => handleOnDrop(acceptedFiles), [
const onDrop = useCallback((acceptedFiles) => handleOnDrop(acceptedFiles), [
handleOnDrop
])

View File

@ -54,7 +54,7 @@ export default class Pagination extends PureComponent<
// adapt based on media query match
marginPagesDisplayed={smallViewport ? 0 : 1}
pageRangeDisplayed={smallViewport ? 3 : 6}
onPageChange={data => handlePageClick(data)}
onPageChange={(data) => handlePageClick(data)}
disableInitialCallback
previousLabel="←"
nextLabel="→"

View File

@ -52,7 +52,7 @@ export const VersionTableContracts = ({
Object.keys(contracts)
// sort alphabetically
.sort((a, b) => a.localeCompare(b))
.map(key => {
.map((key) => {
const submarineLink = `https://submarine.${
network === 'pacific'
? 'oceanprotocol'

View File

@ -148,7 +148,7 @@ export default class VersionNumbers extends PureComponent<
return (
<Market.Consumer>
{market => (
{(market) => (
<p className={styles.versionsMinimal}>
<a
title={`${squid.name} v${squid.version}\n${brizo.name} v${brizo.version}\n${aquarius.name} v${aquarius.version}`}

View File

@ -79,7 +79,7 @@ export default class AssetsUser extends PureComponent<
<>
{results
.slice(0, recent || undefined)
.filter(asset => !!asset)
.filter((asset) => !!asset)
.map((asset: any) => (
<AssetTeaser
list={list}

View File

@ -25,7 +25,7 @@ export default class ChannelTeaser extends Component<
// Get channel content
public channel = channels.items
.filter(({ tag }) => tag === this.props.channel)
.map(channel => channel)[0]
.map((channel) => channel)[0]
public state = {
channelAssets: [],

View File

@ -41,7 +41,7 @@ export default function Footer() {
</small>
<nav className={styles.links}>
{meta.social.map(site => (
{meta.social.map((site) => (
<a key={site.title} href={site.url}>
{site.title}
</a>

View File

@ -29,7 +29,7 @@ export default class Header extends PureComponent {
</NavLink>
<nav className={styles.headerMenu}>
{menu.map(item => (
{menu.map((item) => (
<MenuItem key={item.title} item={item} />
))}
<AccountStatus className={styles.accountStatus} />

View File

@ -22,7 +22,7 @@ export default class Web3message extends PureComponent<{ extended?: boolean }> {
return (
<User.Consumer>
{user => (
{(user) => (
<em
dangerouslySetInnerHTML={{
__html:

View File

@ -119,8 +119,8 @@ export default function AssetDetails({
</h2>
<ul>
{metaFixed
.filter(item => item.show)
.map(item => (
.filter((item) => item.show)
.map((item) => (
<MetaFixedItem
key={shortid.generate()}
name={item.name}

View File

@ -134,7 +134,7 @@ export default class AssetFile extends PureComponent<
<Spinner message={messages[step]} />
) : (
<Market.Consumer>
{market => (
{(market) => (
<Button
primary
className={styles.buttonMain}

View File

@ -14,7 +14,7 @@ export default class AssetFilesDetails extends PureComponent<{
return files.length ? (
<>
<div className={styles.files}>
{files.map(file => (
{files.map((file) => (
<AssetFile key={file.index} ddo={ddo} file={file} />
))}
</div>

View File

@ -86,7 +86,7 @@
a,
button {
transition: color .2s ease-out;
transition: color 0.2s ease-out;
&:hover,
&:focus {

View File

@ -43,7 +43,7 @@ export default function AssetsJobs({ ddo, ocean }: JobsProps) {
setComputeType(comType)
const selectedComputeOption = computeOptions.find(
x => x.name === comType
(x) => x.name === comType
)
if (selectedComputeOption !== undefined)
setComputeValue(selectedComputeOption.value)
@ -99,14 +99,14 @@ export default function AssetsJobs({ ddo, ocean }: JobsProps) {
label="Select image to run the algorithm"
placeholder=""
value={computeType}
options={computeOptions.map(x => x.name)}
options={computeOptions.map((x) => x.name)}
onChange={handleSelectChange}
/>
</div>
<div>
<div className={styles.inputWrap}>
<ReactDropzone
onDrop={acceptedFiles => onDrop(acceptedFiles)}
onDrop={(acceptedFiles) => onDrop(acceptedFiles)}
>
{({ getRootProps, getInputProps }) => (
<div {...getRootProps()}>

View File

@ -27,7 +27,7 @@ export default class Channel extends PureComponent<ChannelProps, ChannelState> {
// get content data based on received channel param
public channel = channels.items
.filter(({ tag }) => tag === this.props.match.params.channel)
.map(channel => channel)[0]
.map((channel) => channel)[0]
public state = {
results: [],

View File

@ -10,7 +10,7 @@ describe('MarketProvider', () => {
<User.Provider value={userMockConnected}>
<MarketProvider ocean={userMockConnected.ocean as any}>
<Market.Consumer>
{market => (
{(market) => (
<div data-testid="hello">{market.network}</div>
)}
</Market.Consumer>

View File

@ -10,7 +10,7 @@ class Channels extends Component {
return (
<Route title={channels.title} description={channels.description}>
<Content wide>
{channels.items.map(channel => (
{channels.items.map((channel) => (
<ChannelTeaser
key={channel.title}
channel={channel.tag}

View File

@ -113,7 +113,7 @@ export default class Files extends PureComponent<FilesProps, FilesStates> {
private addFile = async (url: string) => {
// check for duplicate urls
const duplicateFiles = this.props.files.filter(props =>
const duplicateFiles = this.props.files.filter((props) =>
url.includes(props.url)
)
@ -185,7 +185,7 @@ export default class Files extends PureComponent<FilesProps, FilesStates> {
</ul>
)}
{buttons.map(button => {
{buttons.map((button) => {
const isActive =
(button.id === 'url' && isFormShown) ||
(button.id === 'ipfs' && isIpfsFormShown)

View File

@ -155,7 +155,7 @@ export default class Step extends PureComponent<StepProps, {}> {
{lastStep && (
<Market.Consumer>
{market => (
{(market) => (
<Button
disabled={
!this.context.isLogged ||

View File

@ -147,7 +147,7 @@ class Publish extends Component<{}, PublishState> {
// Setting state for all fields
if (hasContent) {
this.setState(
prevState => ({
(prevState) => ({
validationStatus: {
...prevState.validationStatus,
[this.state.currentStep]: {
@ -162,7 +162,7 @@ class Publish extends Component<{}, PublishState> {
)
} else {
this.setState(
prevState => ({
(prevState) => ({
validationStatus: {
...prevState.validationStatus,
[this.state.currentStep]: {
@ -184,7 +184,7 @@ class Publish extends Component<{}, PublishState> {
// Step 1
//
if (validationStatus[1].name && validationStatus[1].files) {
this.setState(prevState => ({
this.setState((prevState) => ({
validationStatus: {
...prevState.validationStatus,
1: {
@ -194,7 +194,7 @@ class Publish extends Component<{}, PublishState> {
}
}))
} else {
this.setState(prevState => ({
this.setState((prevState) => ({
validationStatus: {
...prevState.validationStatus,
1: {
@ -209,7 +209,7 @@ class Publish extends Component<{}, PublishState> {
// Step 2
//
if (validationStatus[2].description && validationStatus[2].categories) {
this.setState(prevState => ({
this.setState((prevState) => ({
validationStatus: {
...prevState.validationStatus,
2: {
@ -219,7 +219,7 @@ class Publish extends Component<{}, PublishState> {
}
}))
} else {
this.setState(prevState => ({
this.setState((prevState) => ({
validationStatus: {
...prevState.validationStatus,
2: {
@ -238,7 +238,7 @@ class Publish extends Component<{}, PublishState> {
validationStatus[3].copyrightHolder &&
validationStatus[3].license
) {
this.setState(prevState => ({
this.setState((prevState) => ({
validationStatus: {
...prevState.validationStatus,
3: {
@ -248,7 +248,7 @@ class Publish extends Component<{}, PublishState> {
}
}))
} else {
this.setState(prevState => ({
this.setState((prevState) => ({
validationStatus: {
...prevState.validationStatus,
3: {
@ -369,7 +369,7 @@ class Publish extends Component<{}, PublishState> {
public render() {
return (
<Market.Consumer>
{market => (
{(market) => (
<Route
title="Publish"
description={`Publish a new data set into the Ocean Protocol ${market.network} Network.`}

View File

@ -67,7 +67,7 @@ export function register(config?: Config) {
function registerValidSW(swUrl: string, config?: Config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
.then((registration) => {
registration.onupdatefound = () => {
const installingWorker = registration.installing
if (installingWorker == null) {
@ -103,7 +103,7 @@ function registerValidSW(swUrl: string, config?: Config) {
}
}
})
.catch(error => {
.catch((error) => {
console.error('Error during service worker registration:', error)
})
}
@ -111,7 +111,7 @@ function registerValidSW(swUrl: string, config?: Config) {
function checkValidServiceWorker(swUrl: string, config?: Config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl)
.then(response => {
.then((response) => {
// Ensure service worker exists, and that we really are getting a JS file.
const contentType = response.headers.get('content-type')
if (
@ -120,7 +120,7 @@ function checkValidServiceWorker(swUrl: string, config?: Config) {
contentType.indexOf('javascript') === -1)
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
navigator.serviceWorker.ready.then((registration) => {
registration.unregister().then(() => {
window.location.reload()
})
@ -139,7 +139,7 @@ function checkValidServiceWorker(swUrl: string, config?: Config) {
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
navigator.serviceWorker.ready.then((registration) => {
registration.unregister()
})
}

View File

@ -13,17 +13,13 @@ describe('Publish', () => {
// Fill title
cy.get('input#name').type('Commons Integration Test')
// Open Add a file form
cy.get('button')
.contains('+ From URL')
.click()
cy.get('button').contains('+ From URL').click()
// Fill url of file
cy.get('input#url').type(
'https://oceanprotocol.com/tech-whitepaper.pdf'
)
// Add file to main form
cy.get('button')
.contains('Add File')
.click()
cy.get('button').contains('Add File').click()
// Verify and nove to next step
cy.get('button', { timeout: 60000 })
.contains('Next →')
@ -36,10 +32,7 @@ describe('Publish', () => {
// Pick category
cy.get('select#categories').select('Biology')
// Verify and move to next step
cy.get('button')
.contains('Next →')
.should('not.be.disabled')
.click()
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
@ -49,10 +42,7 @@ describe('Publish', () => {
// 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()
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
@ -69,7 +59,7 @@ describe('Publish', () => {
cy.get('a')
.contains('See published asset')
.invoke('attr', 'href')
.then(href => {
.then((href) => {
cy.writeFile(
'cypress/fixtures/did.txt',
href.replace('/asset/', '')
@ -81,17 +71,13 @@ describe('Publish', () => {
// Fill title
cy.get('input#name').type('Commons Integration IPFS Test')
// Open Add a file form
cy.get('button')
.contains('+ From URL')
.click()
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()
cy.get('button').contains('Add File').click()
// Verify and nove to next step
cy.get('button', { timeout: 60000 })
.contains('Next →')
@ -104,10 +90,7 @@ describe('Publish', () => {
// Pick category
cy.get('select#categories').select('Biology')
// Verify and move to next step
cy.get('button')
.contains('Next →')
.should('not.be.disabled')
.click()
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
@ -117,10 +100,7 @@ describe('Publish', () => {
// 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()
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
@ -137,7 +117,7 @@ describe('Publish', () => {
cy.get('a')
.contains('See published asset')
.invoke('attr', 'href')
.then(href => {
.then((href) => {
cy.writeFile(
'cypress/fixtures/did-ipfs.txt',
href.replace('/asset/', '')

View File

@ -10,9 +10,7 @@ describe('Search', () => {
// Fill search phrase
cy.get('input#search').type('Commons Integration Test')
// Start search
cy.get('button')
.contains('Search')
.click()
cy.get('button').contains('Search').click()
// Verify there are results
cy.get('article > a', { timeout: 60000 }).should(
'have.length.greaterThan',

View File

@ -1,7 +1,7 @@
/// <reference types="Cypress" />
describe('Consume', () => {
it('should consume https:// file', () => {
cy.fixture('did').then(did => {
cy.fixture('did').then((did) => {
cy.visit(`/asset/${did}`)
})
@ -31,7 +31,7 @@ describe('Consume', () => {
})
it('should consume ipfs:// file', () => {
cy.fixture('did-ipfs').then(did => {
cy.fixture('did-ipfs').then((did) => {
cy.visit(`/asset/${did}`)
})

View File

@ -10,22 +10,16 @@ describe('Faucet', () => {
})
beforeEach(() => {
cy.get('button[name="FaucetETH"]')
.first()
.as('button')
cy.get('button[name="FaucetETH"]').first().as('button')
})
it('Faucet button is clickable when user is connected.', () => {
cy.get('@button')
.contains('Request ETH')
.should('not.be.disabled')
cy.get('@button').contains('Request ETH').should('not.be.disabled')
})
it('should execute faucet call', () => {
// Execute call
cy.get('@button')
.contains('Request ETH')
.click()
cy.get('@button').contains('Request ETH').click()
// Verify that we got response from server
cy.contains(/(Successfully added|Already requested)/, {
timeout: 60000

View File

@ -1,3 +1,3 @@
/// <reference types="Cypress" />
before(function() {})
before(function () {})

453
package-lock.json generated
View File

@ -227,12 +227,6 @@
"@hapi/hoek": "^8.3.0"
}
},
"@iarna/toml": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/@iarna/toml/-/toml-2.2.3.tgz",
"integrity": "sha512-FmuxfCuolpLl0AnQ2NHSzoUKWEJDFl63qXjzdoWBVyFCXzMGm1spBzk7LeHNoVCiWCF7mRVms9e6jEV9+MoPbg==",
"dev": true
},
"@nodelib/fs.scandir": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz",
@ -397,31 +391,12 @@
}
}
},
"@octokit/plugin-paginate-rest": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz",
"integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==",
"dev": true,
"requires": {
"@octokit/types": "^2.0.1"
}
},
"@octokit/plugin-request-log": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz",
"integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==",
"dev": true
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz",
"integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==",
"dev": true,
"requires": {
"@octokit/types": "^2.0.1",
"deprecation": "^2.3.1"
}
},
"@octokit/request": {
"version": "5.3.2",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.3.2.tgz",
@ -460,30 +435,6 @@
"once": "^1.4.0"
}
},
"@octokit/rest": {
"version": "16.43.1",
"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.1.tgz",
"integrity": "sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==",
"dev": true,
"requires": {
"@octokit/auth-token": "^2.4.0",
"@octokit/plugin-paginate-rest": "^1.1.1",
"@octokit/plugin-request-log": "^1.0.0",
"@octokit/plugin-rest-endpoint-methods": "2.4.0",
"@octokit/request": "^5.2.0",
"@octokit/request-error": "^1.0.2",
"atob-lite": "^2.0.0",
"before-after-hook": "^2.0.0",
"btoa-lite": "^1.0.0",
"deprecation": "^2.0.0",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"lodash.uniq": "^4.5.0",
"octokit-pagination-methods": "^1.1.0",
"once": "^1.4.0",
"universal-user-agent": "^4.0.0"
}
},
"@octokit/types": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.5.0.tgz",
@ -494,9 +445,9 @@
}
},
"@release-it/bumper": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-1.1.0.tgz",
"integrity": "sha512-TThpeghaMLfcHv1ipsyHKgSl1J5OEHU08kM6mVieGLiUbyFfztd+yeqH/QhV94IwX4O+aPjvbVtWpj0c7/pDkw==",
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-1.1.1.tgz",
"integrity": "sha512-7UFl07Ktb1a1s3iXXYJTi9g80P1qLsGHpHxgYdpdJ2Lw8W6gSVQItLF2SPNifjoQoSWl1NOQU8eyQWAsycYKmQ==",
"dev": true,
"requires": {
"detect-indent": "^6.0.0",
@ -504,161 +455,8 @@
"lodash.castarray": "^4.4.0",
"lodash.get": "^4.4.2",
"lodash.set": "^4.3.2",
"mock-fs": "^4.10.1",
"release-it": "^12.4.2"
},
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"inquirer": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.4.tgz",
"integrity": "sha512-Bu5Td5+j11sCkqfqmUTiwv+tWisMtP0L7Q8WrqA2C/BbBhy1YTdFrvjjlrKq8oagA/tLQBski2Gcx/Sqyi2qSQ==",
"dev": true,
"requires": {
"ansi-escapes": "^4.2.1",
"chalk": "^2.4.2",
"cli-cursor": "^3.1.0",
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
"figures": "^3.0.0",
"lodash": "^4.17.15",
"mute-stream": "0.0.8",
"run-async": "^2.2.0",
"rxjs": "^6.5.3",
"string-width": "^4.1.0",
"strip-ansi": "^5.1.0",
"through": "^2.3.6"
},
"dependencies": {
"ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
"requires": {
"color-convert": "^1.9.0"
}
},
"chalk": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
"escape-string-regexp": "^1.0.5",
"supports-color": "^5.3.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
"requires": {
"color-name": "1.1.3"
}
},
"color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
"dev": true,
"requires": {
"has-flag": "^3.0.0"
}
}
}
},
"release-it": {
"version": "12.6.3",
"resolved": "https://registry.npmjs.org/release-it/-/release-it-12.6.3.tgz",
"integrity": "sha512-F1ObTKC/ug1RJpLE/vyxQWwAdfJ7fwsmOcOefo8PGCc7YzqPUOkS2P8+UYr01yt5v4SHliL0Ekg+FU2fzEFIBg==",
"dev": true,
"requires": {
"@iarna/toml": "2.2.3",
"@octokit/rest": "16.43.1",
"any-shell-escape": "0.1.1",
"async-retry": "1.3.1",
"chalk": "3.0.0",
"cosmiconfig": "5.2.1",
"debug": "4.1.1",
"deprecated-obj": "1.0.1",
"detect-repo-changelog": "1.0.1",
"find-up": "4.1.0",
"form-data": "3.0.0",
"git-url-parse": "11.1.2",
"globby": "10.0.2",
"got": "9.6.0",
"import-cwd": "3.0.0",
"inquirer": "7.0.4",
"is-ci": "2.0.0",
"lodash": "4.17.15",
"mime-types": "2.1.26",
"ora": "4.0.3",
"os-name": "3.1.0",
"semver": "7.1.3",
"shelljs": "0.8.3",
"supports-color": "7.1.0",
"update-notifier": "4.1.0",
"url-join": "4.0.1",
"uuid": "7.0.1",
"window-size": "1.1.1",
"yargs-parser": "17.0.0"
}
},
"semver": {
"version": "7.1.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz",
"integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==",
"dev": true
},
"uuid": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-7.0.1.tgz",
"integrity": "sha512-yqjRXZzSJm9Dbl84H2VDHpM3zMjzSJQ+hn6C4zqd5ilW+7P4ZmLEEqwho9LjP+tGuZlF4xrHQXT0h9QZUS/pWA==",
"dev": true
}
"mock-fs": "^4.12.0",
"release-it": "^13.5.7"
}
},
"@samverschueren/stream-to-observable": {
@ -737,23 +535,6 @@
"integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==",
"dev": true
},
"@types/events": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
"integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==",
"dev": true
},
"@types/glob": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
"integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==",
"dev": true,
"requires": {
"@types/events": "*",
"@types/minimatch": "*",
"@types/node": "*"
}
},
"@types/http-cache-semantics": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz",
@ -1047,12 +828,6 @@
"integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==",
"dev": true
},
"any-shell-escape": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/any-shell-escape/-/any-shell-escape-0.1.1.tgz",
"integrity": "sha1-1Vq5ciRMcaml4asIefML8RCAaVk=",
"dev": true
},
"arch": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/arch/-/arch-2.1.1.tgz",
@ -1142,12 +917,6 @@
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
"dev": true
},
"atob-lite": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
"integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=",
"dev": true
},
"auto-changelog": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/auto-changelog/-/auto-changelog-2.0.0.tgz",
@ -1288,12 +1057,6 @@
"fill-range": "^7.0.1"
}
},
"btoa-lite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
"integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=",
"dev": true
},
"buffer-crc32": {
"version": "0.2.13",
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
@ -1356,30 +1119,6 @@
"integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==",
"dev": true
},
"caller-callsite": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
"integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
"dev": true,
"requires": {
"callsites": "^2.0.0"
}
},
"caller-path": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
"integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
"dev": true,
"requires": {
"caller-callsite": "^2.0.0"
}
},
"callsites": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
"integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
"dev": true
},
"camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
@ -1805,18 +1544,6 @@
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
"cosmiconfig": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
"integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
"dev": true,
"requires": {
"import-fresh": "^2.0.0",
"is-directory": "^0.3.1",
"js-yaml": "^3.13.1",
"parse-json": "^4.0.0"
}
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
@ -2963,22 +2690,6 @@
"type-fest": "^0.8.1"
}
},
"globby": {
"version": "10.0.2",
"resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz",
"integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==",
"dev": true,
"requires": {
"@types/glob": "^7.1.1",
"array-union": "^2.1.0",
"dir-glob": "^3.0.1",
"fast-glob": "^3.0.3",
"glob": "^7.1.3",
"ignore": "^5.1.1",
"merge2": "^1.2.3",
"slash": "^3.0.0"
}
},
"got": {
"version": "9.6.0",
"resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz",
@ -3148,16 +2859,6 @@
"import-from": "^3.0.0"
}
},
"import-fresh": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
"integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
"dev": true,
"requires": {
"caller-path": "^2.0.0",
"resolve-from": "^3.0.0"
}
},
"import-from": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz",
@ -3298,12 +2999,6 @@
"kind-of": "^6.0.2"
}
},
"is-directory": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
"dev": true
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@ -3833,12 +3528,6 @@
"integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=",
"dev": true
},
"lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
"integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=",
"dev": true
},
"lodash.uniqby": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz",
@ -4040,26 +3729,18 @@
"dev": true
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true,
"requires": {
"minimist": "0.0.8"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
"dev": true
}
"minimist": "^1.2.5"
}
},
"mock-fs": {
"version": "4.11.0",
"resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.11.0.tgz",
"integrity": "sha512-Yp4o3/ZA15wsXqJTT+R+9w2AYIkD1i80Lds47wDbuUhOvQvm+O2EfjFZSz0pMgZZSPHRhGxgcd2+GL4+jZMtdw==",
"version": "4.12.0",
"resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-4.12.0.tgz",
"integrity": "sha512-/P/HtrlvBxY4o/PzXY9cCNBrdylDNxg7gnrv2sMNxj+UJ2m8jSpl0/A6fuJeNAWr99ZvGWH8XCbE0vmnM5KupQ==",
"dev": true
},
"moment": {
@ -4217,12 +3898,6 @@
"has": "^1.0.3"
}
},
"octokit-pagination-methods": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz",
"integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==",
"dev": true
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@ -4255,68 +3930,6 @@
"word-wrap": "~1.2.3"
}
},
"ora": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/ora/-/ora-4.0.3.tgz",
"integrity": "sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg==",
"dev": true,
"requires": {
"chalk": "^3.0.0",
"cli-cursor": "^3.1.0",
"cli-spinners": "^2.2.0",
"is-interactive": "^1.0.0",
"log-symbols": "^3.0.0",
"mute-stream": "0.0.8",
"strip-ansi": "^6.0.0",
"wcwidth": "^1.0.1"
},
"dependencies": {
"ansi-styles": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"dev": true,
"requires": {
"@types/color-name": "^1.1.1",
"color-convert": "^2.0.1"
}
},
"chalk": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
"integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
"supports-color": "^7.1.0"
}
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true,
"requires": {
"color-name": "~1.1.4"
}
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"strip-ansi": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
"ansi-regex": "^5.0.0"
}
}
}
},
"os-name": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
@ -4590,9 +4203,9 @@
"dev": true
},
"prettier": {
"version": "1.19.1",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
"integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz",
"integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
"dev": true
},
"prettier-linter-helpers": {
@ -5464,12 +5077,6 @@
"integrity": "sha512-rTuiIEqFmGxne4IovivKSDzld2lWW9QCjqv80SYjPgf+gS35eaCAjaP54CCwGAwBtnCsvNLYtqxe1Nw+i6JEmA==",
"dev": true
},
"resolve-from": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
"dev": true
},
"responselike": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
@ -5588,17 +5195,6 @@
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
"dev": true
},
"shelljs": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz",
"integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==",
"dev": true,
"requires": {
"glob": "^7.0.0",
"interpret": "^1.0.0",
"rechoir": "^0.6.2"
}
},
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
@ -6128,15 +5724,6 @@
}
}
},
"universal-user-agent": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz",
"integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==",
"dev": true,
"requires": {
"os-name": "^3.1.0"
}
},
"universalify": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
@ -6593,16 +6180,6 @@
}
}
},
"yargs-parser": {
"version": "17.0.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-17.0.0.tgz",
"integrity": "sha512-Fl4RBJThsWeJl3cRZeGuolcuH78/foVUAYIUpKn8rkCnjn23ilZvJyEZJjnlzoG/+EJKPb1RggD4xS/Jie2nxg==",
"dev": true,
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
},
"yauzl": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",

View File

@ -20,7 +20,7 @@
},
"dependencies": {},
"devDependencies": {
"@release-it/bumper": "^1.1.0",
"@release-it/bumper": "^1.1.1",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"auto-changelog": "^2.0.0",
@ -32,7 +32,7 @@
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-cypress": "^2.10.3",
"eslint-plugin-prettier": "^3.1.2",
"prettier": "^1.19.1",
"prettier": "^2.0.5",
"release-it": "^13.6.1",
"start-server-and-test": "^1.11.0",
"typescript": "^3.8.3"

View File

@ -722,9 +722,9 @@
}
},
"@types/jest": {
"version": "25.2.2",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.2.2.tgz",
"integrity": "sha512-aRctFbG8Pb7DSLzUt/fEtL3q/GKb9mretFuYhRub2J0q6NhzBYbx9HTQzHrWgBNIxYOlxGNVe6Z54cpbUt+Few==",
"version": "25.2.3",
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.2.3.tgz",
"integrity": "sha512-JXc1nK/tXHiDhV55dvfzqtmP4S3sy3T3ouV2tkViZgxY/zeUkcpQcQPGRlgF4KmWzWW5oiWYSZwtCB+2RsE4Fw==",
"dev": true,
"requires": {
"jest-diff": "^25.2.1",

View File

@ -27,7 +27,7 @@
"@types/compression": "^1.7.0",
"@types/debug": "^4.1.5",
"@types/express": "^4.17.6",
"@types/jest": "^25.2.2",
"@types/jest": "^25.2.3",
"@types/morgan": "^1.9.0",
"@types/node": "^14.0.1",
"@types/request": "^2.48.5",

View File

@ -1,7 +1,7 @@
import request from 'supertest'
import server from '../src/server'
afterAll(done => {
afterAll((done) => {
server.close(done)
})
@ -22,9 +22,7 @@ describe('POST /api/v1/urlcheck', () => {
})
it('responds with json on ipfs://', async () => {
const response = await request(server)
.post('/api/v1/urlcheck')
.send({
const response = await request(server).post('/api/v1/urlcheck').send({
url:
'ipfs://QmX5LRpEVocfks9FNDnRoK2imf2fy9mPpP4wfgaDVXWfYD/video.mp4'
})