Removed GopherJS, basic frontend completed, need backend changes for

torrent storage
This commit is contained in:
2017-11-30 18:12:11 -05:00
parent 67fdef16b1
commit e98ad2cc88
69321 changed files with 5498914 additions and 337 deletions

View File

@@ -0,0 +1,6 @@
.idea
.coveralls.yml
.eslintrc
.travis.yml
/artifacts/
/tests/

View File

@@ -0,0 +1,29 @@
Software License Agreement (BSD License)
========================================
Copyright (c) 2015, Yahoo! Inc. All rights reserved.
----------------------------------------------------
Redistribution and use of this software in source and binary forms, with or
without modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be
used to endorse or promote products derived from this software without
specific prior written permission of Yahoo! Inc.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,45 @@
# hoist-non-react-statics
[![NPM version](https://badge.fury.io/js/hoist-non-react-statics.svg)](http://badge.fury.io/js/hoist-non-react-statics)
[![Build Status](https://img.shields.io/travis/mridgway/hoist-non-react-statics.svg)](https://travis-ci.org/mridgway/hoist-non-react-statics)
[![Coverage Status](https://img.shields.io/coveralls/mridgway/hoist-non-react-statics.svg)](https://coveralls.io/r/mridgway/hoist-non-react-statics?branch=master)
[![Dependency Status](https://img.shields.io/david/mridgway/hoist-non-react-statics.svg)](https://david-dm.org/mridgway/hoist-non-react-statics)
[![devDependency Status](https://img.shields.io/david/dev/mridgway/hoist-non-react-statics.svg)](https://david-dm.org/mridgway/hoist-non-react-statics#info=devDependencies)
Copies non-react specific statics from a child component to a parent component.
Similar to `Object.assign`, but with React static keywords blacklisted from
being overridden.
```bash
$ npm install --save hoist-non-react-statics
```
## Usage
```js
import hoistNonReactStatic from 'hoist-non-react-statics';
hoistNonReactStatic(targetComponent, sourceComponent);
```
## What does this module do?
See this [explanation](https://facebook.github.io/react/docs/higher-order-components.html#static-methods-must-be-copied-over) from the React docs.
## Compatible React Versions
| Compatible React Version | hoist-non-react-statics Version |
|--------------------------|-------------------------------|
| 0.13-15.0 | >= 1.0.0 |
## Browser Support
This package uses `Object.defineProperty` which has a broken implementation in IE8. In order to use this package in IE8, you will need a polyfill that fixes this method.
## License
This software is free to use under the Yahoo Inc. BSD license.
See the [LICENSE file][] for license text and copyright information.
[LICENSE file]: https://github.com/mridgway/hoist-non-react-statics/blob/master/LICENSE.md
Third-party open source code used are listed in our [package.json file]( https://github.com/mridgway/hoist-non-react-statics/blob/master/package.json).

View File

@@ -0,0 +1,9 @@
declare module 'hoist-non-react-statics' {
import * as React from 'react';
function hoistNonReactStatics<Own, Custom>(
TargetComponent: React.ComponentType<Own>,
SourceComponent: React.ComponentType<Own & Custom>,
customStatic?: any): React.ComponentType<Own>;
export = hoistNonReactStatics
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
'use strict';
var REACT_STATICS = {
childContextTypes: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
callee: true,
arguments: true,
arity: true
};
var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
module.exports = function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
if (objectPrototype) {
var inheritedComponent = getPrototypeOf(sourceComponent);
if (inheritedComponent && inheritedComponent !== objectPrototype) {
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
}
}
var keys = getOwnPropertyNames(sourceComponent);
if (getOwnPropertySymbols) {
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
}
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
try { // Avoid failures from read-only properties
defineProperty(targetComponent, key, descriptor);
} catch (e) {}
}
}
return targetComponent;
}
return targetComponent;
};

View File

@@ -0,0 +1,75 @@
{
"_args": [
[
"hoist-non-react-statics@2.3.1",
"C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project"
]
],
"_from": "hoist-non-react-statics@2.3.1",
"_id": "hoist-non-react-statics@2.3.1",
"_inBundle": false,
"_integrity": "sha1-ND24TGAYxlB3iJgkATWhQg7iLOA=",
"_location": "/material-ui/hoist-non-react-statics",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "hoist-non-react-statics@2.3.1",
"name": "hoist-non-react-statics",
"escapedName": "hoist-non-react-statics",
"rawSpec": "2.3.1",
"saveSpec": null,
"fetchSpec": "2.3.1"
},
"_requiredBy": [
"/material-ui",
"/material-ui/recompose"
],
"_resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz",
"_spec": "2.3.1",
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
"author": {
"name": "Michael Ridgway",
"email": "mcridgway@gmail.com"
},
"bugs": {
"url": "https://github.com/mridgway/hoist-non-react-statics/issues"
},
"description": "Copies non-react specific statics from a child component to a parent component",
"devDependencies": {
"babel": "^6.23.0",
"babel-cli": "^6.24.1",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-react-jsx-source": "^6.22.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2016": "^6.24.1",
"babel-preset-react": "^6.24.1",
"babel-register": "^6.24.1",
"chai": "^4.0.1",
"coveralls": "^2.11.1",
"create-react-class": "^15.5.3",
"eslint": "^3.8.0",
"istanbul": "^0.4.5",
"mocha": "^3.4.2",
"pre-commit": "^1.0.7",
"react": "^15.0.0"
},
"homepage": "https://github.com/mridgway/hoist-non-react-statics#readme",
"keywords": [
"react"
],
"license": "BSD-3-Clause",
"main": "index.js",
"name": "hoist-non-react-statics",
"repository": {
"type": "git",
"url": "git://github.com/mridgway/hoist-non-react-statics.git"
},
"scripts": {
"cover": "node node_modules/istanbul/lib/cli.js cover --dir artifacts -- ./node_modules/mocha/bin/_mocha tests/unit/ --recursive --compilers js:babel/register --reporter spec",
"lint": "eslint ./index.js",
"test": "mocha tests/unit/ --recursive --compilers js:babel-register --reporter spec"
},
"types": "index.d.ts",
"version": "2.3.1"
}