commit
e6c1f1da04
16 changed files with 388 additions and 258 deletions
|
@ -2,5 +2,6 @@ client/build
|
||||||
node_modules/
|
node_modules/
|
||||||
public/bundle
|
public/bundle
|
||||||
server/render/build
|
server/render/build
|
||||||
|
server/bundle
|
||||||
test/
|
test/
|
||||||
server/chainquery
|
server/chainquery
|
||||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2017-2018 LBRY Inc.
|
Copyright (c) 2017-2019 LBRY Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
|
||||||
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
|
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
"ipAddress": "",
|
"ipAddress": "",
|
||||||
"host": "https://www.example.com",
|
"host": "https://www.example.com",
|
||||||
"description": "A decentralized hosting platform built on LBRY",
|
"description": "A decentralized hosting platform built on LBRY",
|
||||||
"twitter": false
|
"twitter": false,
|
||||||
|
"blockListEndpoint": "https://api.lbry.io/file/list_blocked"
|
||||||
},
|
},
|
||||||
"publishing": {
|
"publishing": {
|
||||||
"primaryClaimAddress": null,
|
"primaryClaimAddress": null,
|
||||||
|
|
|
@ -2,6 +2,16 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.asset-preview__blocked {
|
||||||
|
box-sizing: border-box;
|
||||||
|
background: black;
|
||||||
|
color: white;
|
||||||
|
height: 80%;
|
||||||
|
padding: 5px;
|
||||||
|
//remove margin-bottom after mystery 5px on wrapper is gone.
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.asset-preview__image {
|
.asset-preview__image {
|
||||||
width : 100%;
|
width : 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
|
@ -2,51 +2,59 @@ import React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||||
|
|
||||||
const ClaimPending = () => {
|
|
||||||
return (
|
|
||||||
<div className='claim-pending'>PENDING</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const AssetPreview = ({ defaultThumbnail, claimData }) => {
|
const AssetPreview = ({ defaultThumbnail, claimData }) => {
|
||||||
const {name, fileExt, contentType, thumbnail, title, pending} = claimData;
|
const {name, fileExt, contentType, thumbnail, title, blocked} = claimData;
|
||||||
const showUrl = createCanonicalLink({asset: {...claimData}});
|
const showUrl = createCanonicalLink({asset: {...claimData}});
|
||||||
const embedUrl = `${showUrl}.${fileExt}`;
|
const embedUrl = `${showUrl}.${fileExt}`;
|
||||||
switch (contentType) {
|
|
||||||
case 'image/jpeg':
|
/*
|
||||||
case 'image/jpg':
|
This blocked section shouldn't be necessary after pagination is reworked,
|
||||||
case 'image/png':
|
though it might be useful for channel_mine situations.
|
||||||
case 'image/gif':
|
*/
|
||||||
return (
|
|
||||||
<Link to={showUrl} className='asset-preview'>
|
if (blocked) {
|
||||||
<div>
|
return (
|
||||||
|
<div className='asset-preview'>
|
||||||
|
<div className='asset-preview__blocked'>
|
||||||
|
<h3>Error 451</h3>
|
||||||
|
<p>This content is blocked for legal reasons.</p>
|
||||||
|
</div>
|
||||||
|
<h3 className='asset-preview__title'>Blocked Content</h3>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
switch (contentType) {
|
||||||
|
case 'image/jpeg':
|
||||||
|
case 'image/jpg':
|
||||||
|
case 'image/png':
|
||||||
|
case 'image/gif':
|
||||||
|
return (
|
||||||
|
<Link to={showUrl} className='asset-preview'>
|
||||||
<img
|
<img
|
||||||
className={'asset-preview__image'}
|
className={'asset-preview__image'}
|
||||||
src={embedUrl}
|
src={embedUrl}
|
||||||
alt={name}
|
alt={name}
|
||||||
/>
|
/>
|
||||||
<h3 className='asset-preview__title'>{title}</h3>
|
<h3 className='asset-preview__title'>{title}</h3>
|
||||||
</div>
|
</Link>
|
||||||
</Link>
|
);
|
||||||
);
|
case 'video/mp4':
|
||||||
case 'video/mp4':
|
return (
|
||||||
return (
|
<Link to={showUrl} className='asset-preview'>
|
||||||
<Link to={showUrl} className='asset-preview'>
|
|
||||||
<div>
|
|
||||||
<div className='asset-preview__play-wrapper'>
|
<div className='asset-preview__play-wrapper'>
|
||||||
<img
|
<img
|
||||||
className={'asset-preview__video'}
|
className={'asset-preview__video'}
|
||||||
src={thumbnail || defaultThumbnail}
|
src={thumbnail || defaultThumbnail}
|
||||||
alt={name}
|
alt={name}
|
||||||
/>
|
/>
|
||||||
<div className='asset-preview__play-overlay'></div>
|
<div className='asset-preview__play-overlay' />
|
||||||
</div>
|
</div>
|
||||||
<h3 className='asset-preview__title'>{title}</h3>
|
<h3 className='asset-preview__title'>{title}</h3>
|
||||||
</div>
|
</Link>
|
||||||
</Link>
|
);
|
||||||
);
|
default:
|
||||||
default:
|
return null;
|
||||||
return null;
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
13
client/src/containers/AssetBlocked/index.js
Normal file
13
client/src/containers/AssetBlocked/index.js
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
import View from './view';
|
||||||
|
import { selectAsset } from '../../selectors/show';
|
||||||
|
|
||||||
|
const mapStateToProps = (props) => {
|
||||||
|
const {show} = props;
|
||||||
|
const asset = selectAsset(show);
|
||||||
|
return {
|
||||||
|
asset,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export default connect(mapStateToProps, null)(View);
|
58
client/src/containers/AssetBlocked/view.jsx
Normal file
58
client/src/containers/AssetBlocked/view.jsx
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
import React from 'react';
|
||||||
|
import createCanonicalLink from '../../../../utils/createCanonicalLink';
|
||||||
|
import HorizontalSplit from '@components/HorizontalSplit';
|
||||||
|
/*
|
||||||
|
This component shouldn't be necessary after pagination is reworked,
|
||||||
|
though it might be useful for channel_mine situations.
|
||||||
|
*/
|
||||||
|
class BlockedLeft extends React.PureComponent {
|
||||||
|
render () {
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<img className='asset-image' src={'https://upload.wikimedia.org/wikipedia/commons/archive/a/af/20120315000030%21OR_451.svg'} alt={'451 image'} />
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class BlockedRight extends React.PureComponent {
|
||||||
|
render () {
|
||||||
|
return (
|
||||||
|
<React.Fragment>
|
||||||
|
<p>In response to a complaint we received under the US Digital Millennium Copyright Act, we have blocked access to this content from our applications.</p>
|
||||||
|
<p><a href={'https://lbry.io/faq/dmca'} >Click here</a> for more information.</p>
|
||||||
|
</React.Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AssetBlocked extends React.Component {
|
||||||
|
componentDidMount () {
|
||||||
|
/*
|
||||||
|
This function and fetch exists to send the browser the appropriate 451 error.
|
||||||
|
*/
|
||||||
|
const { asset } = this.props;
|
||||||
|
const { claimData: { contentType, outpoint } } = asset;
|
||||||
|
let fileExt;
|
||||||
|
if (typeof contentType === 'string') {
|
||||||
|
fileExt = contentType.split('/')[1] || 'jpg';
|
||||||
|
}
|
||||||
|
const sourceUrl = `${createCanonicalLink({ asset: asset.claimData })}.${fileExt}?${outpoint}`;
|
||||||
|
fetch(sourceUrl)
|
||||||
|
.catch();
|
||||||
|
}
|
||||||
|
|
||||||
|
render () {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<HorizontalSplit
|
||||||
|
collapseOnMobile
|
||||||
|
leftSide={<BlockedLeft />}
|
||||||
|
rightSide={<BlockedRight />}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AssetBlocked;
|
|
@ -104,7 +104,7 @@ class AssetInfo extends React.Component {
|
||||||
{(contentType === 'video/mp4') ? (
|
{(contentType === 'video/mp4') ? (
|
||||||
<ClickToCopy
|
<ClickToCopy
|
||||||
id={'embed-text-video'}
|
id={'embed-text-video'}
|
||||||
value={`<iframe src="${host}/video-embed${canonicalUrl}" allowfullscreen="true" style="border:0" /></iframe>`}
|
value={`<iframe src="${host}/video-embed${canonicalUrl}" allowfullscreen="true" style="border:0"></iframe>`}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<ClickToCopy
|
<ClickToCopy
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import PageLayout from '@components/PageLayout';
|
import PageLayout from '@components/PageLayout';
|
||||||
import * as Icon from 'react-feather';
|
import * as Icon from 'react-feather';
|
||||||
import AssetDisplay from '@containers/AssetDisplay';
|
import AssetDisplay from '@containers/AssetDisplay';
|
||||||
|
import AssetBlocked from '@containers/AssetBlocked';
|
||||||
import AssetInfo from '@containers/AssetInfo';
|
import AssetInfo from '@containers/AssetInfo';
|
||||||
import ErrorPage from '@pages/ErrorPage';
|
import ErrorPage from '@pages/ErrorPage';
|
||||||
import AssetTitle from '@containers/AssetTitle';
|
import AssetTitle from '@containers/AssetTitle';
|
||||||
|
@ -29,23 +30,32 @@ class ShowAssetDetails extends React.Component {
|
||||||
render () {
|
render () {
|
||||||
const { asset } = this.props;
|
const { asset } = this.props;
|
||||||
if (asset) {
|
if (asset) {
|
||||||
const { claimData: { name } } = asset;
|
const { claimData: { name, blocked } } = asset;
|
||||||
return (
|
if (!blocked) {
|
||||||
<PageLayout
|
return (
|
||||||
pageTitle={`${name} - details`}
|
<PageLayout
|
||||||
asset={asset}
|
pageTitle={`${name} - details`}
|
||||||
>
|
asset={asset}
|
||||||
<div className="asset-main">
|
>
|
||||||
<AssetDisplay />
|
<div className="asset-main">
|
||||||
<AssetTitle />
|
<AssetDisplay />
|
||||||
|
<AssetTitle />
|
||||||
<button className='collapse-button' onClick={this.collapse}>
|
<button className='collapse-button' onClick={this.collapse}>
|
||||||
{this.state.closed ? <Icon.PlusCircle className='plus-icon' /> : <Icon.MinusCircle />}
|
{this.state.closed ? <Icon.PlusCircle className='plus-icon' /> : <Icon.MinusCircle />}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{!this.state.closed && <AssetInfo />}
|
{!this.state.closed && <AssetInfo />}
|
||||||
</PageLayout>
|
</PageLayout>
|
||||||
);
|
);
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<PageLayout>
|
||||||
|
<div className="asset-main">
|
||||||
|
<AssetBlocked />
|
||||||
|
</div>
|
||||||
|
</PageLayout>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<ErrorPage error={'loading asset data...'} />
|
<ErrorPage error={'loading asset data...'} />
|
||||||
|
|
310
package-lock.json
generated
310
package-lock.json
generated
|
@ -2050,33 +2050,29 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"bcrypt": {
|
"bcrypt": {
|
||||||
"version": "2.0.1",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/bcrypt/-/bcrypt-3.0.3.tgz",
|
||||||
"integrity": "sha512-DwB7WgJPdskbR+9Y3OTJtwRq09Lmm7Na6b+4ewvXjkD0nfNRi1OozxljHm5ETlDCBq9DTy04lQz+rj+T2ztIJg==",
|
"integrity": "sha512-4EuzUo6K790QC3uq/ogzy9w2Hc7XDIBoEndU5y7l7YaEAwQF8vyFqv6tC30+gOBZvyxk3F632xzKBQoLNz2pjg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"nan": "2.10.0",
|
"nan": "2.12.1",
|
||||||
"node-pre-gyp": "0.9.1"
|
"node-pre-gyp": "0.12.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"abbrev": {
|
"abbrev": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
|
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "2.1.1",
|
"version": "2.1.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
|
||||||
},
|
},
|
||||||
"aproba": {
|
"aproba": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
|
|
||||||
},
|
},
|
||||||
"are-we-there-yet": {
|
"are-we-there-yet": {
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"delegates": "^1.0.0",
|
"delegates": "^1.0.0",
|
||||||
"readable-stream": "^2.0.6"
|
"readable-stream": "^2.0.6"
|
||||||
|
@ -2084,78 +2080,69 @@
|
||||||
},
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
|
||||||
},
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"balanced-match": "^1.0.0",
|
"balanced-match": "^1.0.0",
|
||||||
"concat-map": "0.0.1"
|
"concat-map": "0.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"chownr": {
|
"chownr": {
|
||||||
"version": "1.0.1",
|
"version": "1.1.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE="
|
|
||||||
},
|
},
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
|
|
||||||
},
|
},
|
||||||
"concat-map": {
|
"concat-map": {
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
|
||||||
},
|
},
|
||||||
"console-control-strings": {
|
"console-control-strings": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
|
|
||||||
},
|
},
|
||||||
"core-util-is": {
|
"core-util-is": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "2.6.9",
|
"version": "2.6.9",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"deep-extend": {
|
||||||
|
"version": "0.6.0",
|
||||||
|
"bundled": true
|
||||||
|
},
|
||||||
"delegates": {
|
"delegates": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
|
|
||||||
},
|
},
|
||||||
"detect-libc": {
|
"detect-libc": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
|
|
||||||
},
|
},
|
||||||
"fs-minipass": {
|
"fs-minipass": {
|
||||||
"version": "1.2.5",
|
"version": "1.2.5",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minipass": "^2.2.1"
|
"minipass": "^2.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
|
||||||
},
|
},
|
||||||
"gauge": {
|
"gauge": {
|
||||||
"version": "2.7.4",
|
"version": "2.7.4",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"aproba": "^1.0.3",
|
"aproba": "^1.0.3",
|
||||||
"console-control-strings": "^1.0.0",
|
"console-control-strings": "^1.0.0",
|
||||||
|
@ -2169,8 +2156,7 @@
|
||||||
},
|
},
|
||||||
"glob": {
|
"glob": {
|
||||||
"version": "7.1.2",
|
"version": "7.1.2",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"fs.realpath": "^1.0.0",
|
"fs.realpath": "^1.0.0",
|
||||||
"inflight": "^1.0.4",
|
"inflight": "^1.0.4",
|
||||||
|
@ -2182,29 +2168,25 @@
|
||||||
},
|
},
|
||||||
"has-unicode": {
|
"has-unicode": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
|
|
||||||
},
|
},
|
||||||
"iconv-lite": {
|
"iconv-lite": {
|
||||||
"version": "0.4.21",
|
"version": "0.4.24",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"safer-buffer": "^2.1.0"
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ignore-walk": {
|
"ignore-walk": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimatch": "^3.0.4"
|
"minimatch": "^3.0.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"inflight": {
|
"inflight": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"once": "^1.3.0",
|
"once": "^1.3.0",
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
|
@ -2212,76 +2194,78 @@
|
||||||
},
|
},
|
||||||
"inherits": {
|
"inherits": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
},
|
||||||
|
"ini": {
|
||||||
|
"version": "1.3.5",
|
||||||
|
"bundled": true
|
||||||
},
|
},
|
||||||
"is-fullwidth-code-point": {
|
"is-fullwidth-code-point": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"number-is-nan": "^1.0.0"
|
"number-is-nan": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"isarray": {
|
"isarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
|
|
||||||
},
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"brace-expansion": "^1.1.7"
|
"brace-expansion": "^1.1.7"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
|
|
||||||
},
|
},
|
||||||
"minipass": {
|
"minipass": {
|
||||||
"version": "2.2.4",
|
"version": "2.3.4",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.2",
|
||||||
"yallist": "^3.0.0"
|
"yallist": "^3.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"bundled": true
|
||||||
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minizlib": {
|
"minizlib": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minipass": "^2.2.1"
|
"minipass": "^2.2.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"minimist": "0.0.8"
|
"minimist": "0.0.8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
},
|
||||||
|
"nan": {
|
||||||
|
"version": "2.12.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz",
|
||||||
|
"integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw=="
|
||||||
},
|
},
|
||||||
"needle": {
|
"needle": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.4",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^2.1.2",
|
"debug": "^2.1.2",
|
||||||
"iconv-lite": "^0.4.4",
|
"iconv-lite": "^0.4.4",
|
||||||
|
@ -2289,17 +2273,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node-pre-gyp": {
|
"node-pre-gyp": {
|
||||||
"version": "0.9.1",
|
"version": "0.12.0",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-8RwHUW3ZL4cZnbx+GDjqt81WyeA=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"detect-libc": "^1.0.2",
|
"detect-libc": "^1.0.2",
|
||||||
"mkdirp": "^0.5.1",
|
"mkdirp": "^0.5.1",
|
||||||
"needle": "^2.2.0",
|
"needle": "^2.2.1",
|
||||||
"nopt": "^4.0.1",
|
"nopt": "^4.0.1",
|
||||||
"npm-packlist": "^1.1.6",
|
"npm-packlist": "^1.1.6",
|
||||||
"npmlog": "^4.0.2",
|
"npmlog": "^4.0.2",
|
||||||
"rc": "^1.1.7",
|
"rc": "^1.2.7",
|
||||||
"rimraf": "^2.6.1",
|
"rimraf": "^2.6.1",
|
||||||
"semver": "^5.3.0",
|
"semver": "^5.3.0",
|
||||||
"tar": "^4"
|
"tar": "^4"
|
||||||
|
@ -2307,22 +2290,19 @@
|
||||||
},
|
},
|
||||||
"nopt": {
|
"nopt": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"abbrev": "1",
|
"abbrev": "1",
|
||||||
"osenv": "^0.1.4"
|
"osenv": "^0.1.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npm-bundled": {
|
"npm-bundled": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.5",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow=="
|
|
||||||
},
|
},
|
||||||
"npm-packlist": {
|
"npm-packlist": {
|
||||||
"version": "1.1.10",
|
"version": "1.1.12",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ignore-walk": "^3.0.1",
|
"ignore-walk": "^3.0.1",
|
||||||
"npm-bundled": "^1.0.1"
|
"npm-bundled": "^1.0.1"
|
||||||
|
@ -2330,8 +2310,7 @@
|
||||||
},
|
},
|
||||||
"npmlog": {
|
"npmlog": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"are-we-there-yet": "~1.1.2",
|
"are-we-there-yet": "~1.1.2",
|
||||||
"console-control-strings": "~1.1.0",
|
"console-control-strings": "~1.1.0",
|
||||||
|
@ -2341,36 +2320,30 @@
|
||||||
},
|
},
|
||||||
"number-is-nan": {
|
"number-is-nan": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
|
|
||||||
},
|
},
|
||||||
"object-assign": {
|
"object-assign": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
|
|
||||||
},
|
},
|
||||||
"once": {
|
"once": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"os-homedir": {
|
"os-homedir": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
|
|
||||||
},
|
},
|
||||||
"os-tmpdir": {
|
"os-tmpdir": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
|
|
||||||
},
|
},
|
||||||
"osenv": {
|
"osenv": {
|
||||||
"version": "0.1.5",
|
"version": "0.1.5",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"os-homedir": "^1.0.0",
|
"os-homedir": "^1.0.0",
|
||||||
"os-tmpdir": "^1.0.0"
|
"os-tmpdir": "^1.0.0"
|
||||||
|
@ -2378,18 +2351,15 @@
|
||||||
},
|
},
|
||||||
"path-is-absolute": {
|
"path-is-absolute": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
|
||||||
},
|
},
|
||||||
"process-nextick-args": {
|
"process-nextick-args": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw=="
|
|
||||||
},
|
},
|
||||||
"rc": {
|
"rc": {
|
||||||
"version": "1.2.8",
|
"version": "1.2.8",
|
||||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
"bundled": true,
|
||||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"deep-extend": "^0.6.0",
|
"deep-extend": "^0.6.0",
|
||||||
"ini": "~1.3.0",
|
"ini": "~1.3.0",
|
||||||
|
@ -2399,15 +2369,13 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"bundled": true
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"readable-stream": {
|
"readable-stream": {
|
||||||
"version": "2.3.5",
|
"version": "2.3.5",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"core-util-is": "~1.0.0",
|
"core-util-is": "~1.0.0",
|
||||||
"inherits": "~2.0.3",
|
"inherits": "~2.0.3",
|
||||||
|
@ -2420,46 +2388,38 @@
|
||||||
},
|
},
|
||||||
"rimraf": {
|
"rimraf": {
|
||||||
"version": "2.6.2",
|
"version": "2.6.2",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"glob": "^7.0.5"
|
"glob": "^7.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"safe-buffer": {
|
"safe-buffer": {
|
||||||
"version": "5.1.1",
|
"version": "5.1.1",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
|
|
||||||
},
|
},
|
||||||
"safer-buffer": {
|
"safer-buffer": {
|
||||||
"version": "2.1.2",
|
"version": "2.1.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
|
||||||
},
|
},
|
||||||
"sax": {
|
"sax": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.5.0",
|
"version": "5.6.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA=="
|
|
||||||
},
|
},
|
||||||
"set-blocking": {
|
"set-blocking": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
|
|
||||||
},
|
},
|
||||||
"signal-exit": {
|
"signal-exit": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
|
|
||||||
},
|
},
|
||||||
"string-width": {
|
"string-width": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"code-point-at": "^1.0.0",
|
"code-point-at": "^1.0.0",
|
||||||
"is-fullwidth-code-point": "^1.0.0",
|
"is-fullwidth-code-point": "^1.0.0",
|
||||||
|
@ -2468,58 +2428,59 @@
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
"string_decoder": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"safe-buffer": "~5.1.0"
|
"safe-buffer": "~5.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"strip-ansi": {
|
"strip-ansi": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-regex": "^2.0.0"
|
"ansi-regex": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"strip-json-comments": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"bundled": true
|
||||||
|
},
|
||||||
"tar": {
|
"tar": {
|
||||||
"version": "4.4.1",
|
"version": "4.4.8",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"chownr": "^1.0.1",
|
"chownr": "^1.1.1",
|
||||||
"fs-minipass": "^1.2.5",
|
"fs-minipass": "^1.2.5",
|
||||||
"minipass": "^2.2.4",
|
"minipass": "^2.3.4",
|
||||||
"minizlib": "^1.1.0",
|
"minizlib": "^1.1.1",
|
||||||
"mkdirp": "^0.5.0",
|
"mkdirp": "^0.5.0",
|
||||||
"safe-buffer": "^5.1.1",
|
"safe-buffer": "^5.1.2",
|
||||||
"yallist": "^3.0.2"
|
"yallist": "^3.0.2"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"bundled": true
|
||||||
|
},
|
||||||
"yallist": {
|
"yallist": {
|
||||||
"version": "3.0.2",
|
"version": "3.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"util-deprecate": {
|
"util-deprecate": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
|
|
||||||
},
|
},
|
||||||
"wide-align": {
|
"wide-align": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.3",
|
||||||
"resolved": false,
|
"bundled": true,
|
||||||
"integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==",
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"string-width": "^1.0.2"
|
"string-width": "^1.0.2 || 2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"wrappy": {
|
"wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": false,
|
"bundled": true
|
||||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3943,7 +3904,8 @@
|
||||||
"deep-extend": {
|
"deep-extend": {
|
||||||
"version": "0.6.0",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
|
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"deep-is": {
|
"deep-is": {
|
||||||
"version": "0.1.3",
|
"version": "0.1.3",
|
||||||
|
@ -7315,9 +7277,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"js-base64": {
|
"js-base64": {
|
||||||
"version": "2.4.9",
|
"version": "2.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz",
|
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.5.0.tgz",
|
||||||
"integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==",
|
"integrity": "sha512-wlEBIZ5LP8usDylWbDNhKPEFVFdI5hCHpnVoT/Ysvoi/PRhJENm/Rlh9TvjYB38HFfKZN7OzEbRjmjvLkFw11g==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"js-beautify": {
|
"js-beautify": {
|
||||||
|
@ -8183,7 +8145,8 @@
|
||||||
"nan": {
|
"nan": {
|
||||||
"version": "2.10.0",
|
"version": "2.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz",
|
||||||
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA=="
|
"integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"nanomatch": {
|
"nanomatch": {
|
||||||
"version": "1.2.13",
|
"version": "1.2.13",
|
||||||
|
@ -8394,9 +8357,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node-sass": {
|
"node-sass": {
|
||||||
"version": "4.10.0",
|
"version": "4.11.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.11.0.tgz",
|
||||||
"integrity": "sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q==",
|
"integrity": "sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"async-foreach": "^0.1.3",
|
"async-foreach": "^0.1.3",
|
||||||
|
@ -12783,17 +12746,6 @@
|
||||||
"requires": {
|
"requires": {
|
||||||
"indent-string": "^2.1.0",
|
"indent-string": "^2.1.0",
|
||||||
"strip-indent": "^1.0.1"
|
"strip-indent": "^1.0.1"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"strip-indent": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
|
|
||||||
"integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
|
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
|
||||||
"get-stdin": "^4.0.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redux": {
|
"redux": {
|
||||||
|
@ -14207,10 +14159,20 @@
|
||||||
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
|
||||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8="
|
||||||
},
|
},
|
||||||
|
"strip-indent": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"get-stdin": "^4.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"strip-json-comments": {
|
"strip-json-comments": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
|
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"style-loader": {
|
"style-loader": {
|
||||||
"version": "0.23.1",
|
"version": "0.23.1",
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.5.0",
|
"@fortawesome/free-solid-svg-icons": "^5.5.0",
|
||||||
"@fortawesome/react-fontawesome": "^0.1.3",
|
"@fortawesome/react-fontawesome": "^0.1.3",
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.18.0",
|
||||||
"bcrypt": "^2.0.1",
|
"bcrypt": "^3.0.3",
|
||||||
"body-parser": "^1.18.3",
|
"body-parser": "^1.18.3",
|
||||||
"connect-multiparty": "^2.2.0",
|
"connect-multiparty": "^2.2.0",
|
||||||
"cookie-session": "^2.0.0-beta.3",
|
"cookie-session": "^2.0.0-beta.3",
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
"mini-css-extract-plugin": "^0.5.0",
|
"mini-css-extract-plugin": "^0.5.0",
|
||||||
"mocha": "^5.2.0",
|
"mocha": "^5.2.0",
|
||||||
"ndb": "^1.0.26",
|
"ndb": "^1.0.26",
|
||||||
"node-sass": "^4.10.0",
|
"node-sass": "^4.11.0",
|
||||||
"nodemon": "^1.18.6",
|
"nodemon": "^1.18.6",
|
||||||
"react-color": "^2.14.1",
|
"react-color": "^2.14.1",
|
||||||
"react-hot-loader": "^4.6.0",
|
"react-hot-loader": "^4.6.0",
|
||||||
|
|
|
@ -5,6 +5,7 @@ const getClaimData = require('server/utils/getClaimData');
|
||||||
const chainquery = require('chainquery').default;
|
const chainquery = require('chainquery').default;
|
||||||
const db = require('../../../../models');
|
const db = require('../../../../models');
|
||||||
const waitOn = require('wait-on');
|
const waitOn = require('wait-on');
|
||||||
|
const logger = require('winston');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
@ -17,32 +18,35 @@ const claimGet = async ({ ip, originalUrl, params }, res) => {
|
||||||
const claimId = params.claimId;
|
const claimId = params.claimId;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
let claimData = await chainquery.claim.queries.resolveClaim(name, claimId).catch(() => {});
|
let claimInfo = await chainquery.claim.queries.resolveClaim(name, claimId).catch(() => {});
|
||||||
if (!claimData) {
|
if (claimInfo) {
|
||||||
claimData = await db.Claim.resolveClaim(name, claimId);
|
logger.info('claim/get: claim resolved in chainquery');
|
||||||
}
|
}
|
||||||
|
if (!claimInfo) {
|
||||||
if (!claimData) {
|
claimInfo = await db.Claim.resolveClaim(name, claimId);
|
||||||
throw new Error('No matching uri found in Claim table');
|
}
|
||||||
|
if (!claimInfo) {
|
||||||
|
throw new Error('claim/get: resolveClaim: No matching uri found in Claim table');
|
||||||
}
|
}
|
||||||
|
|
||||||
let lbrynetResult = await getClaim(`${name}#${claimId}`);
|
let lbrynetResult = await getClaim(`${name}#${claimId}`);
|
||||||
if (!lbrynetResult) {
|
if (!lbrynetResult) {
|
||||||
throw new Error(`Unable to Get ${name}#${claimId}`);
|
throw new Error(`claim/get: getClaim Unable to Get ${name}#${claimId}`);
|
||||||
|
}
|
||||||
|
const claimData = await getClaimData(claimInfo);
|
||||||
|
if (!claimData) {
|
||||||
|
throw new Error('claim/get: getClaimData failed to get file blobs');
|
||||||
|
}
|
||||||
|
await waitOn({
|
||||||
|
resources: [ lbrynetResult.download_path ],
|
||||||
|
timeout : 10000, // 10 seconds
|
||||||
|
window : 500,
|
||||||
|
});
|
||||||
|
const fileData = await createFileRecordDataAfterGet(claimData, lbrynetResult);
|
||||||
|
if (!fileData) {
|
||||||
|
throw new Error('claim/get: createFileRecordDataAfterGet failed to create file in time');
|
||||||
}
|
}
|
||||||
|
|
||||||
let fileData = await createFileRecordDataAfterGet(await getClaimData(claimData), lbrynetResult);
|
|
||||||
const upsertCriteria = { name, claimId };
|
const upsertCriteria = { name, claimId };
|
||||||
await db.upsert(db.File, fileData, upsertCriteria, 'File');
|
await db.upsert(db.File, fileData, upsertCriteria, 'File');
|
||||||
|
|
||||||
try {
|
|
||||||
await waitOn({
|
|
||||||
resources: [ lbrynetResult.file_name ],
|
|
||||||
delay : 500,
|
|
||||||
timeout : 10000, // 10 seconds
|
|
||||||
});
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
const { message, completed } = lbrynetResult;
|
const { message, completed } = lbrynetResult;
|
||||||
res.status(200).json({
|
res.status(200).json({
|
||||||
success: true,
|
success: true,
|
||||||
|
@ -53,5 +57,4 @@ const claimGet = async ({ ip, originalUrl, params }, res) => {
|
||||||
handleErrorResponse(originalUrl, ip, error, res);
|
handleErrorResponse(originalUrl, ip, error, res);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = claimGet;
|
module.exports = claimGet;
|
||||||
|
|
|
@ -16,6 +16,7 @@ const createDatabaseIfNotExists = require('./models/utils/createDatabaseIfNotExi
|
||||||
const { getWalletBalance } = require('./lbrynet/index');
|
const { getWalletBalance } = require('./lbrynet/index');
|
||||||
const configureLogging = require('./utils/configureLogging');
|
const configureLogging = require('./utils/configureLogging');
|
||||||
const configureSlack = require('./utils/configureSlack');
|
const configureSlack = require('./utils/configureSlack');
|
||||||
|
const { setupBlockList } = require('./utils/blockList');
|
||||||
const speechPassport = require('./speechPassport');
|
const speechPassport = require('./speechPassport');
|
||||||
const processTrending = require('./utils/processTrending');
|
const processTrending = require('./utils/processTrending');
|
||||||
|
|
||||||
|
@ -25,7 +26,7 @@ const {
|
||||||
} = require('./middleware/logMetricsMiddleware');
|
} = require('./middleware/logMetricsMiddleware');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
details: { port: PORT },
|
details: { port: PORT, blockListEndpoint },
|
||||||
startup: {
|
startup: {
|
||||||
performChecks,
|
performChecks,
|
||||||
performUpdates,
|
performUpdates,
|
||||||
|
@ -34,6 +35,9 @@ const {
|
||||||
|
|
||||||
const { sessionKey } = require('@private/authConfig.json');
|
const { sessionKey } = require('@private/authConfig.json');
|
||||||
|
|
||||||
|
// configure.js doesn't handle new keys in config.json files yet. Make sure it doens't break.
|
||||||
|
let bLE;
|
||||||
|
|
||||||
function Server () {
|
function Server () {
|
||||||
this.initialize = () => {
|
this.initialize = () => {
|
||||||
// configure logging
|
// configure logging
|
||||||
|
@ -166,19 +170,37 @@ function Server () {
|
||||||
logger.info('Starting LBC balance:', walletBalance);
|
logger.info('Starting LBC balance:', walletBalance);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
this.performUpdates = () => {
|
this.performUpdates = () => {
|
||||||
if (!performUpdates) {
|
if (!performUpdates) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (blockListEndpoint) {
|
||||||
|
bLE = blockListEndpoint;
|
||||||
|
} else if (!blockListEndpoint) {
|
||||||
|
if (typeof (blockListEndpoint) !== 'string') {
|
||||||
|
logger.warn('blockListEndpoint is null due to outdated siteConfig file. \n' +
|
||||||
|
'Continuing with default LBRY blocklist api endpoint. \n ' +
|
||||||
|
'(Specify /"blockListEndpoint" : ""/ to disable.')
|
||||||
|
bLE = 'https://api.lbry.io/file/list_blocked';
|
||||||
|
}
|
||||||
|
}
|
||||||
logger.info(`Peforming updates...`);
|
logger.info(`Peforming updates...`);
|
||||||
return Promise.all([
|
if (!bLE) {
|
||||||
db.Blocked.refreshTable(),
|
logger.info('Configured for no Block List')
|
||||||
db.Tor.refreshTable(),
|
db.Tor.refreshTable().then( (updatedTorList) => {
|
||||||
])
|
|
||||||
.then(([updatedBlockedList, updatedTorList]) => {
|
|
||||||
logger.info('Blocked list updated, length:', updatedBlockedList.length);
|
|
||||||
logger.info('Tor list updated, length:', updatedTorList.length);
|
logger.info('Tor list updated, length:', updatedTorList.length);
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
|
||||||
|
return Promise.all([
|
||||||
|
db.Blocked.refreshTable(bLE),
|
||||||
|
db.Tor.refreshTable()])
|
||||||
|
.then(([updatedBlockedList, updatedTorList]) => {
|
||||||
|
logger.info('Blocked list updated, length:', updatedBlockedList.length);
|
||||||
|
logger.info('Tor list updated, length:', updatedTorList.length);
|
||||||
|
})
|
||||||
|
}
|
||||||
};
|
};
|
||||||
this.start = () => {
|
this.start = () => {
|
||||||
this.initialize();
|
this.initialize();
|
||||||
|
@ -194,6 +216,9 @@ function Server () {
|
||||||
this.performUpdates(),
|
this.performUpdates(),
|
||||||
]);
|
]);
|
||||||
})
|
})
|
||||||
|
.then(() => {
|
||||||
|
return setupBlockList();
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
logger.info('Spee.ch startup is complete');
|
logger.info('Spee.ch startup is complete');
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
|
|
||||||
const BLOCKED_CLAIM = 'BLOCKED_CLAIM';
|
const BLOCKED_CLAIM = 'BLOCKED_CLAIM';
|
||||||
|
|
||||||
module.exports = (sequelize, { STRING }) => {
|
module.exports = (sequelize, { STRING }) => {
|
||||||
|
@ -16,6 +15,14 @@ module.exports = (sequelize, { STRING }) => {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Blocked.getBlockList = function () {
|
||||||
|
logger.debug('returning full block list');
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
this.findAll()
|
||||||
|
.then(list => { return resolve(list) });
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
Blocked.isNotBlocked = function (outpoint) {
|
Blocked.isNotBlocked = function (outpoint) {
|
||||||
logger.debug(`checking to see if ${outpoint} is not blocked`);
|
logger.debug(`checking to see if ${outpoint} is not blocked`);
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
@ -37,9 +44,10 @@ module.exports = (sequelize, { STRING }) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Blocked.refreshTable = function () {
|
Blocked.refreshTable = function (blockEndpoint) {
|
||||||
let blockedList = [];
|
let blockedList = [];
|
||||||
return fetch('https://api.lbry.io/file/list_blocked')
|
|
||||||
|
return fetch(blockEndpoint)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
|
@ -50,9 +58,7 @@ module.exports = (sequelize, { STRING }) => {
|
||||||
if (!jsonResponse.data.outpoints) {
|
if (!jsonResponse.data.outpoints) {
|
||||||
throw new Error('no outpoints in list_blocked response');
|
throw new Error('no outpoints in list_blocked response');
|
||||||
}
|
}
|
||||||
return jsonResponse.data.outpoints;
|
let outpoints = jsonResponse.data.outpoints;
|
||||||
})
|
|
||||||
.then(outpoints => {
|
|
||||||
logger.debug('total outpoints:', outpoints.length);
|
logger.debug('total outpoints:', outpoints.length);
|
||||||
// prep the records
|
// prep the records
|
||||||
for (let i = 0; i < outpoints.length; i++) {
|
for (let i = 0; i < outpoints.length; i++) {
|
||||||
|
|
26
server/utils/blockList.js
Normal file
26
server/utils/blockList.js
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
const logger = require('winston');
|
||||||
|
const db = require('../models');
|
||||||
|
|
||||||
|
let blockList = new Set();
|
||||||
|
|
||||||
|
const setupBlockList = (intervalInSeconds = 60) => {
|
||||||
|
const fetchList = () => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
db.Blocked.getBlockList()
|
||||||
|
.then((result) => {
|
||||||
|
blockList.clear();
|
||||||
|
if (result.length > 0) {
|
||||||
|
result.map((item) => { blockList.add(item.dataValues.outpoint) });
|
||||||
|
resolve();
|
||||||
|
} else reject();
|
||||||
|
})
|
||||||
|
.catch(e => { console.error('list was empty', e) });
|
||||||
|
});
|
||||||
|
};
|
||||||
|
setInterval(() => { fetchList() }, intervalInSeconds * 1000);
|
||||||
|
return fetchList();
|
||||||
|
};
|
||||||
|
module.exports = {
|
||||||
|
isBlocked: (outpoint) => { return blockList.has(outpoint) },
|
||||||
|
setupBlockList,
|
||||||
|
};
|
|
@ -1,6 +1,7 @@
|
||||||
const { details: { host } } = require('@config/siteConfig');
|
const { details: { host } } = require('@config/siteConfig');
|
||||||
const chainquery = require('chainquery').default;
|
const chainquery = require('chainquery').default;
|
||||||
const { getClaim } = require('server/lbrynet');
|
const { getClaim } = require('server/lbrynet');
|
||||||
|
const { isBlocked } = require('./blockList');
|
||||||
|
|
||||||
module.exports = async (data, chName = null, chShortId = null) => {
|
module.exports = async (data, chName = null, chShortId = null) => {
|
||||||
// TODO: Refactor getching the channel name out; requires invasive changes.
|
// TODO: Refactor getching the channel name out; requires invasive changes.
|
||||||
|
@ -9,6 +10,11 @@ module.exports = async (data, chName = null, chShortId = null) => {
|
||||||
let lbrynetFileExt = null;
|
let lbrynetFileExt = null;
|
||||||
let channelShortId = chShortId;
|
let channelShortId = chShortId;
|
||||||
let channelName = chName;
|
let channelName = chName;
|
||||||
|
let blocked;
|
||||||
|
const outPoint = `${data.transaction_hash_id}:${data.vout}`;
|
||||||
|
if (isBlocked(outPoint)) {
|
||||||
|
blocked = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!chName && certificateId && !channelName) {
|
if (!chName && certificateId && !channelName) {
|
||||||
channelName = await chainquery.claim.queries.getClaimChannelName(certificateId).catch(() => {
|
channelName = await chainquery.claim.queries.getClaimChannelName(certificateId).catch(() => {
|
||||||
|
@ -38,8 +44,9 @@ module.exports = async (data, chName = null, chShortId = null) => {
|
||||||
fileExt : data.generated_extension || data.fileExt || lbrynetFileExt,
|
fileExt : data.generated_extension || data.fileExt || lbrynetFileExt,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
thumbnail : data.generated_thumbnail || data.thumbnail_url || data.thumbnail,
|
thumbnail : data.generated_thumbnail || data.thumbnail_url || data.thumbnail,
|
||||||
outpoint : `${data.transaction_hash_id}:${data.vout}` || data.outpoint,
|
outpoint : outPoint || data.outpoint,
|
||||||
host,
|
host,
|
||||||
pending : Boolean(data.height === 0),
|
pending : Boolean(data.height === 0),
|
||||||
|
blocked : blocked,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue