Merge pull request #2225 from lbryio/lbryweb

Lbryweb
This commit is contained in:
Sean Yesmunt 2019-02-25 17:37:29 -05:00 committed by GitHub
commit 0716356d0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 841 additions and 172 deletions

View file

@ -37,6 +37,12 @@
}
],
"func-names": ["warn", "as-needed"],
"no-param-reassign": [
"error",
{
"props": false
}
],
"jsx-a11y/label-has-for": 0,
"import/prefer-default-export": 0,
"no-return-assign": 0,
@ -52,6 +58,7 @@
"no-restricted-syntax": 0,
"no-empty": 0,
"react/prefer-stateless-function": 0,
"react/sort-comp": 0
"react/sort-comp": 0,
"jsx-a11y/media-has-caption": 0
}
}

View file

@ -24,8 +24,10 @@
"compile": "electron-webpack && yarn extract-langs",
"build": "yarn compile && electron-builder build",
"build:dir": "yarn build -- --dir -c.compression=store -c.mac.identity=null",
"build:web": "webpack",
"dev": "electron-webpack dev",
"dev:internal-apis": "LBRY_API_URL='http://localhost:8080' yarn dev",
"dev:web": "webpack --watch",
"lint": "eslint 'src/**/*.{js,jsx}' --fix && flow",
"format": "prettier 'src/**/*.{js,jsx,scss,json}' --write",
"flow-defs": "flow-typed install",
@ -53,7 +55,7 @@
"hast-util-sanitize": "^1.1.2",
"keytar": "^4.2.1",
"lbry-format": "https://github.com/lbryio/lbry-format.git",
"lbry-redux": "lbryio/lbry-redux#3ab065b11a52d3e2e6a50a25459f9ff0aac03b13",
"lbry-redux": "lbryio/lbry-redux#406e1970b9d5594faf0407100c9bbed45d904cdf",
"lbryinc": "lbryio/lbryinc#2334ad53e82c22d6291899785d5292347008f2a9",
"localforage": "^1.7.1",
"mammoth": "^1.4.6",
@ -61,6 +63,7 @@
"mixpanel-browser": "^2.17.1",
"moment": "^2.22.0",
"node-fetch": "^2.3.0",
"preprocess-loader": "^0.3.0",
"qrcode.react": "^0.8.0",
"rc-progress": "^2.0.6",
"react": "^16.8.2",
@ -87,6 +90,7 @@
"stream-to-blob-url": "^2.1.1",
"three": "^0.93.0",
"tree-kill": "^1.1.0",
"video.js": "^7.2.2",
"y18n": "^4.0.0"
},
"devDependencies": {
@ -96,6 +100,7 @@
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-2": "^6.18.0",
"copy-webpack-plugin": "^4.6.0",
"decompress": "^4.2.0",
"del": "^3.0.0",
"devtron": "^1.4.0",
@ -121,6 +126,7 @@
"json-loader": "^0.5.4",
"lint-staged": "^7.0.2",
"make-runnable": "^1.3.6",
"node-libs-browser": "^2.1.0",
"node-loader": "^0.6.0",
"node-sass": "^4.11.0",
"prettier": "^1.11.1",

View file

@ -1,5 +1,6 @@
/* eslint-disable no-console */
// Module imports
// @if TARGET='app'
import keytar from 'keytar';
import SemVer from 'semver';
import url from 'url';
@ -99,10 +100,12 @@ app.on('ready', async () => {
if (isDev) {
await installExtensions();
}
rendererWindow = createWindow(appState);
rendererWindow.webContents.on('devtools-opened', () => {
rendererWindow.webContents.send('devtools-is-opened');
});
tray = createTray(rendererWindow);
// HACK: patch webrequest to fix devtools incompatibility with electron 2.x.
// See https://github.com/electron/electron/issues/13008#issuecomment-400261941
@ -324,3 +327,4 @@ const isSecondInstance = app.makeSingleInstance(argv => {
if (isSecondInstance) {
app.exit();
}
// @endif

View file

@ -1,15 +1,30 @@
/* eslint-disable no-redeclare */
import store from 'store';
import { remote } from 'electron';
import Path from 'path';
// @if TARGET='app'
import y18n from 'y18n';
import { remote } from 'electron';
import isDev from 'electron-is-dev';
// @endif
// @if TARGET='web'
import { y18n } from 'web/stubs';
// @endif
// @if TARGET='app'
const env = process.env.NODE_ENV || 'production';
const i18n = y18n({
directory: Path.join(remote.app.getAppPath(), '/../static/locales').replace(/\\/g, '\\\\'),
updateFiles: false,
locale: 'en',
});
// @endif
// @if TARGET='web'
const env = process.env.NODE_ENV || 'development';
const i18n = y18n({
updateFiles: false,
locale: 'en',
});
// @endif
const logs = [];
const app = {
@ -22,6 +37,7 @@ const app = {
},
};
// @if TARGET='app'
// Workaround for https://github.com/electron-userland/electron-webpack/issues/52
if (!isDev) {
window.staticResourcesPath = Path.join(remote.app.getAppPath(), '../static').replace(
@ -31,6 +47,7 @@ if (!isDev) {
} else {
window.staticResourcesPath = '';
}
// @endif
// eslint-disable-next-line no-underscore-dangle
global.__ = i18n.__;
@ -42,3 +59,4 @@ global.app = app;
global.store = app.store;
export default app;
/* eslint-enable no-redeclare */

View file

@ -119,7 +119,9 @@ class App extends React.PureComponent<Props> {
src={Native.imagePath('gerbil-happy.png')}
/>
)}
{/* @if TARGET='app' */}
<SideBar />
{/* @endif */}
<div className="content" id="content">
<Router />
<ModalRouter />

View file

@ -5,7 +5,16 @@ import path from 'path';
import React from 'react';
import Button from 'component/button';
import parseData from 'util/parse-data';
/* eslint-disable no-redeclare */
// @if TARGET='app'
// $FlowFixMe
import { remote } from 'electron';
// @endif
// @if TARGET='web'
// $FlowFixMe
import { remote } from 'web/stubs';
// @endif
/* eslint-enable no-redeclare */
type Props = {
data: Array<any>,

View file

@ -1,6 +1,15 @@
// @flow
import React from 'react';
import * as React from 'react';
/* eslint-disable no-redeclare */
// @if TARGET='app'
// $FlowFixMe
import { remote } from 'electron';
// @endif
// @if TARGET='web'
// $FlowFixMe
import { remote } from 'web/stubs';
// @endif
/* eslint-enable no-redeclare */
import Button from 'component/button';
import { FormField } from 'component/common/form';
import path from 'path';
@ -24,9 +33,14 @@ class FileSelector extends React.PureComponent<Props> {
type: 'file',
};
fileInput: { current: React.ElementRef<any> };
constructor() {
super();
this.input = null;
// @if TARGET='web'
this.fileInput = React.createRef();
// @endif
}
handleButtonClick() {
@ -54,6 +68,20 @@ class FileSelector extends React.PureComponent<Props> {
);
}
handleFileInputSelection() {
const { files } = this.fileInput.current;
if (!files) {
return;
}
const filePath = files[0];
const fileName = filePath.name;
if (this.props.onFileChosen) {
this.props.onFileChosen(filePath, fileName);
}
}
input: ?HTMLInputElement;
render() {
@ -63,22 +91,29 @@ class FileSelector extends React.PureComponent<Props> {
type === 'file' ? fileLabel || __('Choose File') : directoryLabel || __('Choose Directory');
return (
<FormField
webkitdirectory="true"
className="form-field--copyable"
type="text"
ref={input => {
if (this.input) this.input = input;
}}
onFocus={() => {
if (this.input) this.input.select();
}}
readOnly="readonly"
value={currentPath || __('No File Chosen')}
inputButton={
<Button button="primary" onClick={() => this.handleButtonClick()} label={label} />
}
/>
<React.Fragment>
{/* @if TARGET='app' */}
<FormField
webkitdirectory="true"
className="form-field--copyable"
type="text"
ref={input => {
if (this.input) this.input = input;
}}
onFocus={() => {
if (this.input) this.input.select();
}}
readOnly="readonly"
value={currentPath || __('No File Chosen')}
inputButton={
<Button button="primary" onClick={() => this.handleButtonClick()} label={label} />
}
/>
{/* @endif */}
{/* @if TARGET='web' */}
<input type="file" ref={this.fileInput} onChange={() => this.handleFileInputSelection()} />
{/* @endif */}
</React.Fragment>
);
}
}

View file

@ -7,9 +7,11 @@ import ThreeViewer from 'component/viewers/threeViewer';
import DocumentViewer from 'component/viewers/documentViewer';
import DocxViewer from 'component/viewers/docxViewer';
import HtmlViewer from 'component/viewers/htmlViewer';
import AudioVideoViewer from 'component/viewers/audioVideoViewer';
type Props = {
mediaType: string,
poster?: string,
source: {
stream: string => void,
fileName: string,
@ -54,6 +56,7 @@ class FileRender extends React.PureComponent<Props> {
// Process command
let message = {};
try {
// $FlowFixMe
message = JSON.parse(/^\$LBRY_IPC:(.*)/.exec(e.message)[1]);
} catch (err) {}
// eslint-disable-next-line no-console
@ -88,10 +91,10 @@ class FileRender extends React.PureComponent<Props> {
}
renderViewer() {
const { source, mediaType, currentTheme } = this.props;
const { source, mediaType, currentTheme, poster } = this.props;
// Extract relevant data to render file
const { stream, fileType, contentType, downloadPath } = source;
const { stream, fileType, contentType, downloadPath, fileName } = source;
// Human-readable files (scripts and plain-text files)
const readableFiles = ['text', 'document', 'script'];
@ -112,6 +115,14 @@ class FileRender extends React.PureComponent<Props> {
webpreferences="sandbox=true,contextIsolation=true,webviewTag=false,enableRemoteModule=false,devTools=false"
/>
),
video: (
<AudioVideoViewer
source={{ downloadPath, fileName }}
contentType={contentType}
poster={poster}
/>
),
audio: <AudioVideoViewer source={{ downloadPath, fileName }} contentType={contentType} />,
// Add routes to viewer...
};

View file

@ -80,10 +80,7 @@ const Header = (props: Props) => {
<WunderBar />
{
// TODO: Make `Menu` add `.active` class to `.navigation` when clicked
}
{/* @if TARGET='app' */}
<div className="header__navigation">
<Button
className="header__navigation-item header__navigation-item--menu"
@ -111,6 +108,7 @@ const Header = (props: Props) => {
/>
)}
</div>
{/* @endif */}
</header>
);
};

View file

@ -53,7 +53,6 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
componentDidMount() {
const { checkDaemonVersion } = this.props;
this.adjustErrorTimeout();
Lbry.connect()
.then(checkDaemonVersion)
@ -93,12 +92,21 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
}
updateStatus() {
// @if TARGET='app'
Lbry.status().then(status => {
this.updateStatusCallback(status);
});
// @endif
// @if TARGET='web'
Lbry.status().then(status => {
Lbry.account_list().then(accountList => {
this.updateStatusCallback(status, accountList);
});
});
// @endif
}
updateStatusCallback(status: Status) {
updateStatusCallback(status: Status, accountList: any) {
const { notifyUnlockWallet, authenticate, modal } = this.props;
const { launchedModal } = this.state;
@ -117,11 +125,20 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
const { wallet, blockchain_headers: blockchainHeaders } = status;
// If the wallet is locked, stop doing anything and make the user input their password
// xxxif TARGET='app'
if (wallet && wallet.is_locked) {
// Clear the error timeout, it might sit on this step for a while until someone enters their password
if (this.timeout) {
clearTimeout(this.timeout);
}
// xxxendif
// xxxif TARGET='web'
// if (accountList && accountList.encrypted) {
// this.setState({
// isRunning: true,
// });
// xxxendif
// Make sure there isn't another active modal (like INCOMPATIBLE_DAEMON)
if (launchedModal === false && !modal) {
@ -130,7 +147,7 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
} else if (status.is_running) {
// If we cleared the error timout due to a wallet being locked, make sure to start it back up
if (!this.timeout) {
this.adjustErrorTimeout();
this.adjustErrorTimseout();
}
Lbry.resolve({ urls: 'lbry://one' }).then(() => {

View file

@ -0,0 +1,67 @@
// @flow
import React from 'react';
import { stopContextMenu } from 'util/context-menu';
import videojs from 'video.js';
import 'video.js/dist/video-js.css';
type Props = {
source: {
downloadPath: string,
fileName: string,
},
contentType: string,
poster?: string,
};
class AudioVideoViewer extends React.PureComponent<Props> {
videoNode: ?HTMLVideoElement;
player: ?{ dispose: () => void };
componentDidMount() {
const { source, contentType, poster } = this.props;
const { downloadPath, fileName } = source;
const indexOfFileName = downloadPath.indexOf(fileName);
const basePath = downloadPath.slice(0, indexOfFileName);
const encodedFileName = encodeURIComponent(fileName);
// We only want to encode the fileName so forward slashes "/" are handled properly by the file system
// TODO: Determine changes needed for windows
const path = `${basePath}${encodedFileName}`;
const sources = [
{
src: path,
type: contentType,
},
];
const videoJsOptions = {
autoplay: true,
controls: true,
preload: 'auto',
poster,
sources,
};
this.player = videojs(this.videoNode, videoJsOptions, () => {});
}
componentWillUnmount() {
if (this.player) {
this.player.dispose();
}
}
render() {
return (
<div className="file-render__viewer" onContextMenu={stopContextMenu}>
<div data-vjs-player>
<video ref={node => (this.videoNode = node)} className="video-js" />
</div>
</div>
);
}
}
export default AudioVideoViewer;

View file

@ -3,10 +3,12 @@
import App from 'component/app';
import SnackBar from 'component/snackBar';
import SplashScreen from 'component/splash';
// @if TARGET='app'
import moment from 'moment';
import * as ACTIONS from 'constants/action_types';
import * as MODALS from 'constants/modal_types';
import { ipcRenderer, remote, shell } from 'electron';
import * as ACTIONS from 'constants/action_types';
// @endif
import * as MODALS from 'constants/modal_types';
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
@ -17,7 +19,13 @@ import {
doOpenModal,
doHideModal,
} from 'redux/actions/app';
import { doToast, doBlackListedOutpointsSubscribe, isURIValid, setSearchApi } from 'lbry-redux';
import {
Lbry,
doToast,
doBlackListedOutpointsSubscribe,
isURIValid,
setSearchApi,
} from 'lbry-redux';
import { doNavigate, doHistoryBack, doHistoryForward } from 'redux/actions/navigation';
import { doDownloadLanguages, doUpdateIsNightAsync } from 'redux/actions/settings';
import { doAuthenticate, Lbryio, rewards } from 'lbryinc';
@ -28,10 +36,12 @@ import app from './app';
import analytics from './analytics';
import doLogWarningConsoleMessage from './logWarningConsoleMessage';
const { autoUpdater } = remote.require('electron-updater');
const APPPAGEURL = 'lbry://?';
// @if TARGET='app'
const { autoUpdater } = remote.require('electron-updater');
autoUpdater.logger = remote.require('electron-log');
// @endif
if (process.env.LBRY_API_URL) {
Lbryio.setLocalApi(process.env.LBRY_API_URL);
@ -41,6 +51,7 @@ if (process.env.SEARCH_API_URL) {
setSearchApi(process.env.SEARCH_API_URL);
}
// @if TARGET='app'
ipcRenderer.on('navigate-backward', () => {
app.store.dispatch(doHistoryBack());
});
@ -48,6 +59,12 @@ ipcRenderer.on('navigate-backward', () => {
ipcRenderer.on('navigate-forward', () => {
app.store.dispatch(doHistoryForward());
});
// @endif
// @if TARGET='web'
Lbry.setDaemonConnectionString('/api/proxy');
console.log('set string');
// @endif
// We need to override Lbryio for getting/setting the authToken
// We interect with ipcRenderer to get the auth key from a users keyring
@ -74,7 +91,9 @@ Lbryio.setOverride(
const newAuthToken = response.auth_token;
authToken = newAuthToken;
// @if TARGET='app'
ipcRenderer.send('set-auth-token', authToken);
// @endif
resolve();
});
})
@ -87,12 +106,14 @@ Lbryio.setOverride(
if (authToken) {
resolve(authToken);
} else {
// @if TARGET='app'
ipcRenderer.once('auth-token-response', (event, token) => {
Lbryio.authToken = token;
resolve(token);
});
ipcRenderer.send('get-auth-token');
// @endif
}
})
);
@ -109,6 +130,7 @@ rewards.setCallback('claimRewardSuccess', () => {
app.store.dispatch(doHideModal(MODALS.REWARD_APPROVAL_REQUIRED));
});
// @if TARGET='app'
ipcRenderer.on('open-uri-requested', (event, uri, newSession) => {
if (uri && uri.startsWith('lbry://')) {
if (uri.startsWith('lbry://?verify')) {
@ -146,6 +168,7 @@ ipcRenderer.on('devtools-is-opened', () => {
const logOnDevelopment = false;
doLogWarningConsoleMessage(logOnDevelopment);
});
// @endif
document.addEventListener('dragover', event => {
event.preventDefault();
@ -178,15 +201,18 @@ document.addEventListener('click', event => {
}
}
if (target.matches('a[href^="http"]') || target.matches('a[href^="mailto"]')) {
// @if TARGET='app'
event.preventDefault();
shell.openExternal(target.href);
return;
// @endif
}
target = target.parentNode;
}
});
const init = () => {
// @if TARGET='app'
moment.locale(remote.app.getLocale());
autoUpdater.on('error', error => {
@ -210,6 +236,7 @@ const init = () => {
app.store.dispatch(doUpdateIsNightAsync());
app.store.dispatch(doDownloadLanguages());
app.store.dispatch(doBlackListedOutpointsSubscribe());
// @endif
function onDaemonReady() {
window.sessionStorage.setItem('loaded', 'y'); // once we've made it here once per session, we don't need to show splash again
@ -224,6 +251,9 @@ const init = () => {
</Provider>,
document.getElementById('app')
);
// @if TARGET='web'
// window.sessionStorage.removeItem('loaded');
// @endif
}
if (window.sessionStorage.getItem('loaded') === 'y') {

View file

@ -4,12 +4,19 @@ const Native = {};
Native.getAppVersionInfo = () =>
new Promise(resolve => {
// @if TARGET='app'
ipcRenderer.once('version-info-received', (event, versionInfo) => {
resolve(versionInfo);
});
ipcRenderer.send('version-info-requested');
// @endif
});
// @if TARGET='app'
Native.imagePath = file => `${staticResourcesPath}/img/${file}`;
// @endif
// @if TARGET='web'
Native.imagePath = file => `staticResourcesPath/img/${file}`;
// @endif
export default Native;

View file

@ -1,7 +1,9 @@
// @if TARGET='app'
import { execSync } from 'child_process';
import isDev from 'electron-is-dev';
import path from 'path';
import { ipcRenderer, remote } from 'electron';
// @endif
import * as ACTIONS from 'constants/action_types';
import * as MODALS from 'constants/modal_types';
import { Lbry, doBalanceSubscribe, doFetchFileInfosAndPublishedClaims, doError } from 'lbry-redux';
@ -23,9 +25,11 @@ import {
import { doAuthenticate } from 'lbryinc';
import { lbrySettings as config, version as appVersion } from 'package.json';
// @if TARGET='app'
const { autoUpdater } = remote.require('electron-updater');
const { download } = remote.require('electron-dl');
const Fs = remote.require('fs');
// @endif
const CHECK_UPGRADE_INTERVAL = 10 * 60 * 1000;
@ -71,6 +75,7 @@ export function doStartUpgrade() {
export function doDownloadUpgrade() {
return (dispatch, getState) => {
// @if TARGET='app'
const state = getState();
// Make a new directory within temp directory so the filename is guaranteed to be available
const dir = Fs.mkdtempSync(remote.app.getPath('temp') + path.sep);
@ -101,6 +106,7 @@ export function doDownloadUpgrade() {
});
dispatch(doHideModal());
dispatch(doOpenModal(MODALS.DOWNLOADING));
// @endif
};
}
@ -255,6 +261,7 @@ export function doCheckUpgradeSubscribe() {
export function doCheckDaemonVersion() {
return dispatch => {
// @if TARGET='app'
Lbry.version().then(({ lbrynet_version: lbrynetVersion }) => {
// Avoid the incompatible daemon modal if running in dev mode
// Lets you run a different daemon than the one specified in package.json
@ -270,6 +277,12 @@ export function doCheckDaemonVersion() {
return dispatch(doOpenModal(MODALS.INCOMPATIBLE_DAEMON));
});
// @endif
// @if TARGET='web'
dispatch({
type: ACTIONS.DAEMON_VERSION_MATCH,
});
// @endif
};
}
@ -305,12 +318,14 @@ export function doDaemonReady() {
dispatch({ type: ACTIONS.DAEMON_READY });
dispatch(doFetchDaemonSettings());
dispatch(doBalanceSubscribe());
// @if TARGET='app'
dispatch(doFetchFileInfosAndPublishedClaims());
if (!selectIsUpgradeSkipped(state)) {
dispatch(doCheckUpgradeAvailable());
}
dispatch(doCheckUpgradeSubscribe());
dispatch(doCheckSubscriptionsInit());
// @endif
};
}
@ -324,14 +339,16 @@ export function doClearCache() {
export function doQuit() {
return () => {
// @if TARGET='app'
remote.app.quit();
// @endif
};
}
export function doQuitAnyDaemon() {
return dispatch => {
// @if TARGET='app'
Lbry.stop()
.then()
.catch(() => {
try {
if (process.platform === 'win32') {
@ -342,8 +359,11 @@ export function doQuitAnyDaemon() {
} catch (error) {
dispatch(doAlertError(`Quitting daemon failed due to: ${error.message}`));
}
})
.finally(() => {
dispatch(doQuit());
});
dispatch(doQuit());
// @endif
};
}

View file

@ -6,11 +6,9 @@ import {
doAbandonClaim,
selectMyClaimsOutpoints,
selectFileInfosByOutpoint,
selectTotalDownloadProgress,
} from 'lbry-redux';
import { doHideModal } from 'redux/actions/app';
import { doHistoryBack } from 'redux/actions/navigation';
import setProgressBar from 'util/set-progress-bar';
export function doOpenFileInFolder(path) {
return () => {
@ -56,9 +54,6 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
outpoint,
},
});
const totalProgress = selectTotalDownloadProgress(getState());
setProgressBar(totalProgress);
};
}

View file

@ -2,9 +2,20 @@
import * as ACTIONS from 'constants/action_types';
import * as MODALS from 'constants/modal_types';
/* eslint-disable no-redeclare */
// @if TARGET='app'
// $FlowFixMe
import { remote } from 'electron';
// @endif
// @if TARGET='web'
// $FlowFixMe
import { remote } from 'web/stubs';
// @endif
/* eslint-enable no-redeclare */
// @if TARGET='app'
const win = remote.BrowserWindow.getFocusedWindow();
// @endif
const reducers = {};
@ -164,7 +175,9 @@ reducers[ACTIONS.DOWNLOADING_COMPLETED] = state => {
const { badgeNumber } = state;
// Don't update the badge number if the window is focused
// @if TARGET='app'
if (win && win.isFocused()) return Object.assign({}, state);
// @endif
return Object.assign({}, state, {
badgeNumber: badgeNumber + 1,

View file

@ -27,10 +27,17 @@
height: 100%;
iframe,
webview {
webview,
.video-js {
width: 100%;
height: 100%;
}
// Removing the play button because we have autoplay turned on
// These are classes added by video.js
// .video-js .vjs-big-play-button {
// display: none;
// }
}
.document-viewer {

View file

@ -1,5 +1,12 @@
/* eslint-disable no-redeclare */
// @if TARGET='app'
import { clipboard, remote } from 'electron';
import isDev from 'electron-is-dev';
// @endif
// @if TARGET='web'
import { remote, isDev } from 'web/stubs';
// @endif
/* eslint-enable no-redeclare */
function injectDevelopmentTemplate(event, templates) {
if (!isDev) return templates;

View file

@ -1,3 +1,5 @@
/* eslint-disable no-redeclare */
// @if TARGET='app'
import { remote } from 'electron';
const application = remote.app;
@ -9,5 +11,11 @@ const setBadge = text => {
dock.setBadge(text);
};
// @endif
// @if TARGET='web'
const setBadge = () => {};
// @endif
/* eslint-enable no-redeclare */
export default setBadge;

View file

@ -1,9 +0,0 @@
import { remote } from 'electron';
const win = remote.getCurrentWindow();
const setProgressBar = progress => {
win.setProgressBar(progress);
};
export default setProgressBar;

View file

@ -0,0 +1,2 @@
import '../index';
import './publish';

View file

@ -0,0 +1,67 @@
// @flow
import { Lbry } from 'lbry-redux';
function checkAndParseFix(response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
return response.json().then(json => {
let error;
if (json.error) {
error = new Error(json.error);
} else {
error = new Error('Protocol error with unknown response signature');
}
return Promise.reject(error);
});
}
// A modified version of Lbry.apiCall that allows
// to perform calling methods at arbitrary urls
// and pass form file fields
function apiCallViaWeb(
connectionString: string,
method: string,
params: { file_path: string },
resolve: Function,
reject: Function
) {
const counter = new Date().getTime();
const fileField = params.file_path;
// Putting a dummy value here, the server is going to process the POSTed file
// and set the file_path itself
params.file_path = '__POST_FILE__';
const jsonPayload = JSON.stringify({
jsonrpc: '2.0',
method,
params,
id: counter,
});
const body = new FormData();
body.append('file', fileField);
body.append('json_payload', jsonPayload);
const options = {
method: 'POST',
body,
};
return fetch(connectionString, options)
.then(checkAndParseFix)
.then(response => {
const error = response.error || (response.result && response.result.error);
if (error) {
return reject(error);
}
return resolve(response.result);
})
.catch(reject);
}
Lbry.setOverride(
'publish',
params =>
new Promise((resolve, reject) => {
apiCallViaWeb('/storage/content/', 'publish', params, resolve, reject);
})
);

29
src/renderer/web/stubs.js Normal file
View file

@ -0,0 +1,29 @@
const callable = () => {
throw Error('Need to fix this stub');
};
const returningCallable = value => () => value;
export const remote = {
dialog: {
showOpenDialog: callable,
},
getCurrentWindow: callable,
app: {
getAppPath: callable,
},
BrowserWindow: {
getFocusedWindow: callable,
},
Menu: {
getApplicationMenu: callable,
},
require: callable,
};
export const y18n = () => ({
getLocale: returningCallable('en'),
__: value => value,
__n: value => value,
});
export const isDev = false;

View file

@ -1,35 +0,0 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>LBRY</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600italic,600' rel='stylesheet' type='text/css'>
<link href="./css/all.css" rel="stylesheet" type="text/css" media="screen,print" />
<link rel="icon" type="image/png" href="img/fav/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/fav/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="img/fav/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="img/fav/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="img/fav/favicon-16x16.png" sizes="16x16">
<meta name="msapplication-TileColor" content="#155B4A">
<meta name="msapplication-TileImage" content="/img/fav/mstile-144x144.png">
<meta name="theme-color" content="#155B4A">
<style>
body {
background-color: "#155b4a"
}
</style>
</head>
<div id="canvas">
<div class="load-screen" style="color: white; min-height: 100vh; min-width: 100vw; display: flex; flex-direction: column; align-items: center; justify-content: center;">
<img src="img/lbry-white-485x160.png" alt="LBRY">
<div style="margin-top: 24px; width: 325px; text-align: center;">
<h3>
<span>Shutting Down <span class="busy-indicator"></span>
</span>
</h3>
</div>
</div>
</div>
</html>

View file

@ -1 +0,0 @@
lbrynet>=0.8.4

View file

@ -1,35 +0,0 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>LBRY</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600italic,600' rel='stylesheet' type='text/css'>
<link href="./css/all.css" rel="stylesheet" type="text/css" media="screen,print" />
<link rel="icon" type="image/png" href="img/fav/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/fav/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="img/fav/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="img/fav/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="img/fav/favicon-16x16.png" sizes="16x16">
<meta name="msapplication-TileColor" content="#155B4A">
<meta name="msapplication-TileImage" content="/img/fav/mstile-144x144.png">
<meta name="theme-color" content="#155B4A">
<style>
body {
background-color: "#155b4a"
}
</style>
</head>
<div id="canvas">
<div class="load-screen" style="color: white; min-height: 100vh; min-width: 100vw; display: flex; flex-direction: column; align-items: center; justify-content: center;">
<img src="img/lbry-white-485x160.png" alt="LBRY">
<div style="margin-top: 24px; width: 325px; text-align: center;">
<h3>
<span>Starting LBRY Upgrade <span class="busy-indicator"></span>
</span>
</h3>
</div>
</div>
</div>
</html>

View file

@ -1,35 +0,0 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>LBRY</title>
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600italic,600' rel='stylesheet' type='text/css'>
<link href="./css/all.css" rel="stylesheet" type="text/css" media="screen,print" />
<link rel="icon" type="image/png" href="img/fav/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="img/fav/favicon-194x194.png" sizes="194x194">
<link rel="icon" type="image/png" href="img/fav/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="img/fav/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="img/fav/favicon-16x16.png" sizes="16x16">
<meta name="msapplication-TileColor" content="#155B4A">
<meta name="msapplication-TileImage" content="/img/fav/mstile-144x144.png">
<meta name="theme-color" content="#155B4A">
<style>
body {
background-color: "#155b4a"
}
</style>
</head>
<div id="canvas">
<div class="load-screen" style="color: white; min-height: 100vh; min-width: 100vw; display: flex; flex-direction: column; align-items: center; justify-content: center;">
<img src="img/lbry-white-485x160.png" alt="LBRY">
<div style="margin-top: 24px; width: 325px; text-align: center;">
<h3>
<span>The daemon has unexpectedly shutdown. Goodbye.
</span>
</h3>
</div>
</div>
</div>
</html>

126
webpack.config.js Normal file
View file

@ -0,0 +1,126 @@
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const STATIC_ROOT = path.resolve(__dirname, 'static/');
const DIST_ROOT = path.resolve(__dirname, 'dist/');
const RENDERER_PROCESS_ROOT = path.resolve(__dirname, 'src/renderer/');
module.exports = env => {
return {
// commented out because of webpack 3
// mode: 'development',
entry: './src/renderer/web/index.js',
output: {
path: path.resolve(__dirname, 'dist/web'),
filename: 'bundle.js',
publicPath: '/static/app/',
},
target: 'web',
node: {
fs: 'empty',
// electron: "empty",
'electron-is-dev': 'mock',
store: 'mock',
y18n: 'mock',
tls: 'mock',
net: 'mock',
},
module: {
rules: [
{
test: /\.jsx?$/,
use: [
{
loader: 'babel-loader',
options: {
presets: ['env', 'react', 'stage-2'],
},
},
{
loader: 'preprocess-loader',
options: {
TARGET: 'web',
LBRYNET_PROXY_URL: '/api_proxy/',
ppOptions: {
type: 'js',
},
},
},
],
exclude: /node_modules/,
},
{
test: /\.scss$/,
use: [
'style-loader', // creates style nodes from JS strings
'css-loader', // translates CSS into CommonJS
'sass-loader', // compiles Sass to CSS, using Node Sass by default
],
},
{
test: /\.(woff|woff2)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'static/font/',
},
},
],
},
{
// All images should use this, but we need to bring them into components
test: /\.(gif|png)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'static/img/',
},
},
],
},
{
test: /\.css$/,
loader: ['style-loader', 'css-loader'],
},
],
},
resolve: {
modules: [RENDERER_PROCESS_ROOT, 'node_modules', __dirname],
extensions: ['.js', '.jsx', '.scss', '.json'],
},
plugins: [
new CopyWebpackPlugin([
{
from: `${STATIC_ROOT}/`,
to: `${DIST_ROOT}/web/static/`,
ignore: ['daemon/**/*', 'font/**/*'],
},
]),
],
externals: [
(function() {
var IGNORES = [
'electron',
'breakdance',
'i18n',
// 'electron-is-dev',
// 'store',
// 'y18n',
// 'tls',
// 'net'
];
return function(context, request, callback) {
if (IGNORES.indexOf(request) >= 0) {
// return callback(null, "require('" + request + "')");
return callback(null, '{}');
}
return callback();
};
})(),
],
};
};

View file

@ -8,19 +8,31 @@ if (PROCESS_ARGV) {
PROCESS_ARGV = JSON.parse(PROCESS_ARGV);
}
const isDev = PROCESS_ARGV && PROCESS_ARGV.original &&
(PROCESS_ARGV.original.indexOf('dev') !== -1);
const isDev = PROCESS_ARGV && PROCESS_ARGV.original && PROCESS_ARGV.original.indexOf('dev') !== -1;
module.exports = {
// This rule is temporarily necessary until https://github.com/electron-userland/electron-webpack/issues/60 is fixed.
module: {
rules: [
{
test: /\.jsx?$/,
loader: 'babel-loader',
options: {
presets: ['env', 'react', 'stage-2'],
},
use: [
// This rule is temporarily necessary until https://github.com/electron-userland/electron-webpack/issues/60 is fixed.
{
loader: 'babel-loader',
options: {
presets: ['env', 'react', 'stage-2'],
},
},
{
loader: 'preprocess-loader',
options: {
TARGET: 'app',
ppOptions: {
type: 'js',
},
},
},
],
},
],
},
@ -29,9 +41,11 @@ module.exports = {
modules: [ELECTRON_RENDERER_PROCESS_ROOT, 'node_modules', __dirname],
extensions: ['.js', '.jsx', '.scss'],
},
plugins: isDev ? [
new FilewatcherPlugin({
watchFileRegex: [require.resolve('lbry-redux'), require.resolve('lbryinc')],
}),
] : [],
plugins: isDev
? [
new FilewatcherPlugin({
watchFileRegex: [require.resolve('lbry-redux'), require.resolve('lbryinc')],
}),
]
: [],
};

293
yarn.lock
View file

@ -61,6 +61,13 @@
esutils "^2.0.2"
js-tokens "^3.0.0"
"@babel/runtime@^7.2.0":
version "7.3.1"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.3.1.tgz#574b03e8e8a9898eaf4a872a92ea20b7846f6f2a"
integrity sha512-7jGW8ppV0ant637pIqAcFfQDDH1orEPGJb8aXfUozuCU3QqX7rX4DA8iwrbPrR1hcH0FTTHz47yQnk+bl5xHQA==
dependencies:
regenerator-runtime "^0.12.0"
"@babel/template@7.0.0-beta.44":
version "7.0.0-beta.44"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
@ -174,6 +181,19 @@
version "1.13.6"
resolved "https://registry.yarnpkg.com/@types/webpack-env/-/webpack-env-1.13.6.tgz#128d1685a7c34d31ed17010fc87d6a12c1de6976"
"@videojs/http-streaming@1.5.1":
version "1.5.1"
resolved "https://registry.yarnpkg.com/@videojs/http-streaming/-/http-streaming-1.5.1.tgz#b6c81ec1f1ec93ee57c261f34c144f5493c9fc31"
integrity sha512-Pc3aVr4SRINFLhUWjTofVjQ9iMjs9myXnyfJ0AdW0c4bLwJ0Fw7HUsbns+qseuBzVJe01i7J2R/DE1Y4hFgblA==
dependencies:
aes-decrypter "3.0.0"
global "^4.3.0"
m3u8-parser "4.2.0"
mpd-parser "0.7.0"
mux.js "5.0.1"
url-toolkit "^2.1.3"
video.js "^6.8.0 || ^7.0.0"
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
@ -213,6 +233,15 @@ acorn@^5.0.0, acorn@^5.2.1, acorn@^5.5.0:
version "5.7.1"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.1.tgz#f095829297706a7c9776958c0afc8930a9b9d9d8"
aes-decrypter@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/aes-decrypter/-/aes-decrypter-3.0.0.tgz#7848a1c145b9fdbf57ae3e2b5b1bc7cf0644a8fb"
integrity sha1-eEihwUW5/b9Xrj4rWxvHzwZEqPs=
dependencies:
commander "^2.9.0"
global "^4.3.2"
pkcs7 "^1.0.2"
agent-base@4, agent-base@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9"
@ -561,6 +590,7 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
babel-core@^6.26.0:
version "6.26.3"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==
dependencies:
babel-code-frame "^6.26.0"
babel-generator "^6.26.0"
@ -1275,6 +1305,11 @@ big.js@^3.0.2, big.js@^3.1.3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
big.js@^5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==
binary-extensions@^1.0.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
@ -2279,6 +2314,20 @@ copy-descriptor@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
copy-webpack-plugin@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.6.0.tgz#e7f40dd8a68477d405dd1b7a854aae324b158bae"
integrity sha512-Y+SQCF+0NoWQryez2zXn5J5knmr9z/9qSQt7fbL78u83rxmigOy8X5+BFn8CFSuX+nKT8gpYwJX68ekqtQt6ZA==
dependencies:
cacache "^10.0.4"
find-cache-dir "^1.0.0"
globby "^7.1.1"
is-glob "^4.0.0"
loader-utils "^1.1.0"
minimatch "^3.0.4"
p-limit "^1.0.0"
serialize-javascript "^1.4.0"
core-js@^1.0.0:
version "1.2.7"
resolved "http://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
@ -2799,6 +2848,13 @@ diffie-hellman@^5.0.0:
miller-rabin "^4.0.0"
randombytes "^2.0.0"
dir-glob@^2.0.0:
version "2.2.2"
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-2.2.2.tgz#fa09f0694153c8918b18ba0deafae94769fc50c4"
integrity sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==
dependencies:
path-type "^3.0.0"
dmg-builder@4.14.1:
version "4.14.1"
resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-4.14.1.tgz#af1e2c7b40407291555f72df9bfee2ed7d0ebf68"
@ -2859,6 +2915,11 @@ dom-serializer@0, dom-serializer@~0.1.0:
domelementtype "~1.1.1"
entities "~1.1.1"
dom-walk@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=
domain-browser@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
@ -3652,6 +3713,11 @@ events@1.1.1, events@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
events@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88"
integrity sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==
eventsource@0.1.6:
version "0.1.6"
resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232"
@ -4146,6 +4212,13 @@ follow-redirects@^1.0.0:
dependencies:
debug "^3.1.0"
for-each@^0.3.2:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==
dependencies:
is-callable "^1.1.3"
for-in@^0.1.3:
version "0.1.8"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-0.1.8.tgz#d8773908e31256109952b1fdb9b3fa867d2775e1"
@ -4437,6 +4510,14 @@ global-dirs@^0.1.0:
dependencies:
ini "^1.3.4"
global@4.3.2, global@^4.3.0, global@^4.3.1, global@^4.3.2, global@~4.3.0:
version "4.3.2"
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=
dependencies:
min-document "^2.19.0"
process "~0.5.1"
globals@^11.0.1, globals@^11.1.0:
version "11.7.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.7.0.tgz#a583faa43055b1aca771914bf68258e2fc125673"
@ -4466,6 +4547,18 @@ globby@^6.1.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
globby@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
integrity sha1-+yzP+UAfhgCUXfral0QMypcrhoA=
dependencies:
array-union "^1.0.1"
dir-glob "^2.0.0"
glob "^7.1.2"
ignore "^3.3.5"
pify "^3.0.0"
slash "^1.0.0"
globule@^1.0.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/globule/-/globule-1.2.1.tgz#5dffb1b191f22d20797a9369b49eab4e9839696d"
@ -4917,7 +5010,7 @@ ignore-walk@^3.0.1:
dependencies:
minimatch "^3.0.4"
ignore@^3.3.3:
ignore@^3.3.3, ignore@^3.3.5:
version "3.3.10"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043"
@ -4962,6 +5055,11 @@ indexof@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
individual@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/individual/-/individual-2.0.0.tgz#833b097dad23294e76117a98fb38e0d9ad61bb97"
integrity sha1-gzsJfa0jKU52EXqY+zjg2a1hu5c=
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
@ -5192,6 +5290,11 @@ is-fullwidth-code-point@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
is-function@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5"
integrity sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU=
is-glob@^2.0.0, is-glob@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
@ -5465,6 +5568,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
"js-tokens@^3.0.0 || ^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
js-yaml@^3.12.0, js-yaml@^3.9.0, js-yaml@^3.9.1:
version "3.12.0"
@ -5660,10 +5764,11 @@ lazy-val@^1.0.3:
tar-stream "^1.6.2"
zstd-codec "^0.1.1"
lbry-redux@lbryio/lbry-redux#3ab065b11a52d3e2e6a50a25459f9ff0aac03b13:
lbry-redux@lbryio/lbry-redux#00755bef2eaef739a44dc0ad66bd5dece50497ac:
version "0.0.1"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/3ab065b11a52d3e2e6a50a25459f9ff0aac03b13"
resolved "https://codeload.github.com/lbryio/lbry-redux/tar.gz/00755bef2eaef739a44dc0ad66bd5dece50497ac"
dependencies:
preprocess-loader "^0.3.0"
proxy-polyfill "0.1.6"
reselect "^3.0.0"
uuid "^3.3.2"
@ -5832,6 +5937,15 @@ loader-utils@^0.2.11, loader-utils@^0.2.16, loader-utils@^0.2.2:
json5 "^0.5.0"
object-assign "^4.0.1"
loader-utils@^1.0.0:
version "1.2.3"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7"
integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==
dependencies:
big.js "^5.2.2"
emojis-list "^2.0.0"
json5 "^1.0.1"
loader-utils@^1.0.1, loader-utils@^1.0.2, loader-utils@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
@ -6059,6 +6173,11 @@ lz-string@^1.4.4:
version "1.4.4"
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26"
m3u8-parser@4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/m3u8-parser/-/m3u8-parser-4.2.0.tgz#c8e0785fd17f741f4408b49466889274a9e36447"
integrity sha512-LVHw0U6IPJjwk9i9f7Xe26NqaUHTNlIt4SSWoEfYFROeVKHN6MIjOhbRheI3dg8Jbq5WCuMFQ0QU3EgZpmzFPg==
make-dir@^1.0.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c"
@ -6313,6 +6432,13 @@ mimic-response@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
min-document@^2.19.0:
version "2.19.0"
resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685"
integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=
dependencies:
dom-walk "^0.1.0"
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
@ -6459,6 +6585,14 @@ mp4-stream@^2.0.0:
next-event "^1.0.0"
readable-stream "^2.0.3"
mpd-parser@0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/mpd-parser/-/mpd-parser-0.7.0.tgz#d36e3322579fce23d657f71a3c2f3e6cc5ce4002"
integrity sha512-nkzVIkecaDz3q7p4ToN3GR0FV2Odbh0w2sJ8ijsyw79JcBrJoUD3KHIiI8gL0hEDlex7mrVpTxXBsRHowUBmPw==
dependencies:
global "^4.3.2"
url-toolkit "^2.1.1"
ms@0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
@ -6489,6 +6623,11 @@ mute-stream@0.0.7:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
mux.js@5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/mux.js/-/mux.js-5.0.1.tgz#ccf757d18f30e65179bd38d60ccc9f04e9cb1e3a"
integrity sha512-yfmJ9CaLGSyRnEwqwzvISSZe6EdcvXIsgapZfuNNFuUQUlYDwltnCgZqV6IG90daY4dYTemK/hxMoxI1bB6RjA==
nan@2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a"
@ -6667,6 +6806,35 @@ node-libs-browser@^0.7.0:
util "^0.10.3"
vm-browserify "0.0.4"
node-libs-browser@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77"
integrity sha512-5MQunG/oyOaBdttrL40dA7bUfPORLRWMUJLQtMg7nluxUvk5XwnLdL9twQHFAjRx/y7mIMkLKT9++qPbbk6BZA==
dependencies:
assert "^1.1.1"
browserify-zlib "^0.2.0"
buffer "^4.3.0"
console-browserify "^1.1.0"
constants-browserify "^1.0.0"
crypto-browserify "^3.11.0"
domain-browser "^1.1.1"
events "^3.0.0"
https-browserify "^1.0.0"
os-browserify "^0.3.0"
path-browserify "0.0.0"
process "^0.11.10"
punycode "^1.2.4"
querystring-es3 "^0.2.0"
readable-stream "^2.3.3"
stream-browserify "^2.0.1"
stream-http "^2.7.2"
string_decoder "^1.0.0"
timers-browserify "^2.0.4"
tty-browserify "0.0.0"
url "^0.11.0"
util "^0.11.0"
vm-browserify "0.0.4"
node-loader@^0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/node-loader/-/node-loader-0.6.0.tgz#c797ef51095ed5859902b157f6384f6361e05ae8"
@ -7022,7 +7190,7 @@ p-finally@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae"
p-limit@^1.1.0:
p-limit@^1.0.0, p-limit@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
dependencies:
@ -7131,6 +7299,14 @@ parse-glob@^3.0.4:
is-extglob "^1.0.0"
is-glob "^2.0.0"
parse-headers@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.1.tgz#6ae83a7aa25a9d9b700acc28698cd1f1ed7e9536"
integrity sha1-aug6eqJanZtwCswoaYzR8e1+lTY=
dependencies:
for-each "^0.3.2"
trim "0.0.1"
parse-json@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9"
@ -7204,6 +7380,13 @@ path-type@^2.0.0:
dependencies:
pify "^2.0.0"
path-type@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f"
integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==
dependencies:
pify "^3.0.0"
pbkdf2-compat@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/pbkdf2-compat/-/pbkdf2-compat-2.0.1.tgz#b6e0c8fa99494d94e0511575802a59a5c142f288"
@ -7244,6 +7427,11 @@ pinkie@^2.0.0:
version "2.0.4"
resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870"
pkcs7@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/pkcs7/-/pkcs7-1.0.2.tgz#b6dba527528c2942bfc122ce2dafcdb5e59074e7"
integrity sha1-ttulJ1KMKUK/wSLOLa/NteWQdOc=
pkg-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
@ -7606,6 +7794,21 @@ prepend-http@^1.0.0, prepend-http@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
preprocess-loader@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/preprocess-loader/-/preprocess-loader-0.3.0.tgz#21092bef9f75393f76cc20093d72d6e0229d8c78"
integrity sha512-dnHXb8y3tZljNWyuUe1Pps30eKg49GKSsSqwGJYDMaJqdNnC3xO4LtDZR9zYlLojnk1lOKk1I5dAMPkeD5g9rA==
dependencies:
loader-utils "^1.0.0"
preprocess "^3.0.2"
preprocess@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/preprocess/-/preprocess-3.1.0.tgz#a44e5cdd5bbb5a54f0ad289aaeed80995d7d938a"
integrity sha1-pE5c3Vu7WlTwrSiaru2AmV19k4o=
dependencies:
xregexp "3.1.0"
preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
@ -7651,6 +7854,11 @@ process@^0.11.0, process@^0.11.10:
version "0.11.10"
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
process@~0.5.1:
version "0.5.2"
resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf"
integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=
progress-stream@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/progress-stream/-/progress-stream-1.2.0.tgz#2cd3cfea33ba3a89c9c121ec3347abe9ab125f77"
@ -8149,6 +8357,11 @@ regenerator-runtime@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
regenerator-runtime@^0.12.0:
version "0.12.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de"
integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg==
regenerator-transform@^0.10.0:
version "0.10.1"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
@ -8476,6 +8689,13 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"
rust-result@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/rust-result/-/rust-result-1.0.0.tgz#34c75b2e6dc39fe5875e5bdec85b5e0f91536f72"
integrity sha1-NMdbLm3Dn+WHXlveyFteD5FTb3I=
dependencies:
individual "^2.0.0"
rx-lite-aggregates@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
@ -8500,6 +8720,13 @@ safe-buffer@5.1.2, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
safe-json-parse@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-4.0.0.tgz#7c0f578cfccd12d33a71c0e05413e2eca171eaac"
integrity sha1-fA9XjPzNEtM6ccDgVBPi7KFx6qw=
dependencies:
rust-result "^1.0.0"
safe-regex@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
@ -9591,6 +9818,11 @@ tslib@^1.9.0, tslib@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
tsml@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/tsml/-/tsml-1.0.1.tgz#89f8218b9d9e257f47d7f6b56d01c5a4d2c68fc3"
integrity sha1-ifghi52eJX9H1/a1bQHFpNLGj8M=
tty-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
@ -9919,6 +10151,11 @@ url-to-options@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
url-toolkit@^2.1.1, url-toolkit@^2.1.3:
version "2.1.6"
resolved "https://registry.yarnpkg.com/url-toolkit/-/url-toolkit-2.1.6.tgz#6d03246499e519aad224c44044a4ae20544154f2"
integrity sha512-UaZ2+50am4HwrV2crR/JAf63Q4VvPYphe63WGeoJxeu8gmOm0qxPt+KsukfakPNrX9aymGNEkkaoICwn+OuvBw==
url@0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64"
@ -9957,6 +10194,13 @@ util@^0.10.3:
dependencies:
inherits "2.0.3"
util@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61"
integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==
dependencies:
inherits "2.0.3"
utila@~0.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/utila/-/utila-0.3.3.tgz#d7e8e7d7e309107092b05f8d9688824d633a4226"
@ -10019,6 +10263,32 @@ vfile@^2.0.0:
unist-util-stringify-position "^1.0.0"
vfile-message "^1.0.0"
"video.js@^6.8.0 || ^7.0.0", video.js@^7.2.2:
version "7.4.1"
resolved "https://registry.yarnpkg.com/video.js/-/video.js-7.4.1.tgz#41349d3b0ca40fa281c6f906381a0a41b75bd04e"
integrity sha512-UmTHiJWcil8YN65M1t/d63X6ofLtQwnvJoYEN4VKzkECYIHbgzvMRgOmrf5bNtVeDC6JsFKLZQXJ7s6Au2jgcQ==
dependencies:
"@babel/runtime" "^7.2.0"
"@videojs/http-streaming" "1.5.1"
global "4.3.2"
safe-json-parse "4.0.0"
tsml "1.0.1"
videojs-font "3.1.0"
videojs-vtt.js "0.14.1"
xhr "2.4.0"
videojs-font@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/videojs-font/-/videojs-font-3.1.0.tgz#ac33be9b517fe19299f61cccd2b3c7d75a1c6960"
integrity sha512-rxB68SVgbHD+kSwoNWNCHicKJuR2ga3bGfvGxmB+8fupsiLbnyCwTBVtrZUq4bZnD64mrKP1DxHiutxwrs59pQ==
videojs-vtt.js@0.14.1:
version "0.14.1"
resolved "https://registry.yarnpkg.com/videojs-vtt.js/-/videojs-vtt.js-0.14.1.tgz#da583eb1fc9c81c826a9432b706040e8dea49911"
integrity sha512-YxOiywx6N9t3J5nqsE5WN2Sw4CSqVe3zV+AZm2T4syOc2buNJaD6ZoexSdeszx2sHLU/RRo2r4BJAXFDQ7Qo2Q==
dependencies:
global "^4.3.1"
videostream@^2.3.0:
version "2.4.3"
resolved "https://registry.yarnpkg.com/videostream/-/videostream-2.4.3.tgz#bdcc252309fa1d4e7077643d2809b822270b5e60"
@ -10317,6 +10587,16 @@ xdg-basedir@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
xhr@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.4.0.tgz#e16e66a45f869861eeefab416d5eff722dc40993"
integrity sha1-4W5mpF+GmGHu76tBbV7/ci3ECZM=
dependencies:
global "~4.3.0"
is-function "^1.0.1"
parse-headers "^2.0.0"
xtend "^4.0.0"
xml2js@0.4.17:
version "0.4.17"
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868"
@ -10352,6 +10632,11 @@ xpipe@*:
version "1.0.5"
resolved "https://registry.yarnpkg.com/xpipe/-/xpipe-1.0.5.tgz#8dd8bf45fc3f7f55f0e054b878f43a62614dafdf"
xregexp@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-3.1.0.tgz#14d8461e0bdd38224bfee5039a0898fc42fcd336"
integrity sha1-FNhGHgvdOCJL/uUDmgiY/EL80zY=
xregexp@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020"