Skip to content

Commit b14859d

Browse files
kristenmillsstevezau
authored andcommitted
Plugins structure (Flexget#15)
* Just moving stuff around first * Update webpack and the store * Moved again * move file * Starting the registry * Started fixing imports * Update eslintrc * Fixed the snapshots * Get the plugin stuff working * Fix linter
1 parent dbc1e04 commit b14859d

File tree

213 files changed

+734
-719
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+734
-719
lines changed

.circleci/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# FlexGet WebUI CI/CD
2+
3+
## Manual Deploy
4+
The deploy/release job can be manually triggered if required.
5+
6+
**WARNING: Manually triggering the deploy job WILL NOT ensure tests are passing**:
7+
8+
```
9+
curl -u ${CIRCLE_API_TOKEN} -d "build_parameters[CIRCLE_JOB]=build" https://circleci.com/api/v1.1/project/github/Flexget/webui/tree/develop
10+
```

.circleci/README.rst

-11
This file was deleted.

.editorconfig

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1+
root = true
2+
13
[*]
24
end_of_line = lf
35
insert_final_newline = true
46
charset = utf-8
57
indent_size = 2
68
indent_style = space
7-
8-
[*.py]
9-
indent_size = 4

.eslintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ module.exports = {
1818
}
1919
}
2020
},
21+
globals: {
22+
__DEV__: true,
23+
},
2124
rules: {
2225
'react/forbid-prop-types': 'off',
2326
'react/jsx-no-bind': 'off',

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,4 @@ typings/
6363
dist/
6464

6565
junit.xml
66+
jsconfig.json

__init__.py

-46
This file was deleted.

jest.config.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
module.exports = {
22
collectCoverageFrom: [
33
'src/**/*.{js,jsx}',
4-
'!src/js/store/*.js',
5-
'!src/js/store/series/*.js',
6-
'!src/js/{app,history,root,theme}.{js,jsx}',
7-
'!src/js/utils/*.{js,jsx}',
4+
'!src/store.js',
5+
'!src/core/registry/**',
6+
'!src/plugins/series/data/*.js',
7+
'!src/{app,history,root,theme}.{js,jsx}',
8+
'!src/utils/*.{js,jsx}',
89
'!**/node_modules/**',
910
'!**/dist/**',
10-
'!src/js/store/**/shapes.js',
11+
'!src/store/**/shapes.js',
1112
],
1213
coverageThreshold: {
1314
global: {
@@ -24,15 +25,14 @@ module.exports = {
2425
moduleDirectories: [
2526
'node_modules',
2627
'src',
27-
'src/js',
2828
],
2929
moduleNameMapper: {
3030
'\\.css$': 'identity-obj-proxy',
31-
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/src/js/__mocks__/fileMock.js',
31+
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/src/__mocks__/fileMock.js',
3232
},
3333
setupFiles: [
3434
'raf/polyfill',
35-
'<rootDir>/src/js/utils/tests/setupFiles.js',
35+
'<rootDir>/src/utils/tests/setupFiles.js',
3636
],
37-
setupTestFrameworkScriptFile: '<rootDir>/src/js/utils/tests/setupTest.js',
37+
setupTestFrameworkScriptFile: '<rootDir>/src/utils/tests/setupTest.js',
3838
};

package-lock.json

+55
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
"description": "Flexget Web UI",
55
"main": "index.js",
66
"scripts": {
7-
"start": "NODE_ENV=development BABEL_ENV=development node ./server.js",
7+
"start": "NODE_ENV=development BABEL_ENV=development babel-node ./server.js",
88
"build": "NODE_ENV=production BABEL_ENV=production webpack --config webpack.prod.js",
99
"debug": "DEBUG=true npm run build",
1010
"lint": "eslint --ext .js --ext .jsx src",
11-
"lint:css": "stylelint './src/js/**/*.js'",
11+
"lint:css": "stylelint './src/**/*.js'",
1212
"test": "jest",
1313
"test:watch": "jest --watch",
1414
"cov": "cat coverage/lcov.info | codacy-coverage"
@@ -24,6 +24,7 @@
2424
},
2525
"homepage": "https://github.com/Flexget/Flexget#readme",
2626
"devDependencies": {
27+
"babel-cli": "^6.26.0",
2728
"babel-core": "^6.26.0",
2829
"babel-eslint": "^7.2.3",
2930
"babel-jest": "^20.0.3",
@@ -86,6 +87,7 @@
8687
"emotion": "^8.0.6",
8788
"font-awesome": "^4.7.0",
8889
"history": "^4.7.2",
90+
"invariant": "^2.2.2",
8991
"jss": "^8.1.0",
9092
"jss-preset-default": "^3.0.0",
9193
"loaders.css": "^0.1.2",
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/js/app.jsx src/app.jsx

File renamed without changes.

src/js/common/ErrorStatus/ErrorStatus.spec.js src/components/ErrorStatus/ErrorStatus.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { mapStateToProps } from 'common/ErrorStatus';
1+
import { mapStateToProps } from 'components/ErrorStatus';
22

3-
describe('common/ErrorStatus', () => {
3+
describe('components/ErrorStatus', () => {
44
it('should be correct if an error status should be displayed', () => {
55
expect(mapStateToProps({ status: { error: 'Error Status' } })).toMatchSnapshot();
66
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`components/ErrorStatus should be correct if an error status should be displayed 1`] = `
4+
Object {
5+
"message": undefined,
6+
"open": true,
7+
}
8+
`;
9+
10+
exports[`components/ErrorStatus should be correct if an error status should not be displayed 1`] = `
11+
Object {
12+
"message": undefined,
13+
"open": false,
14+
}
15+
`;

src/js/common/ErrorStatus/index.js src/components/ErrorStatus/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { connect } from 'react-redux';
2-
import StatusBar from 'common/StatusBar';
3-
import { clearStatus } from 'store/status/actions';
2+
import StatusBar from 'components/StatusBar';
3+
import { clearStatus } from 'core/status/data/actions';
44

55
export function mapStateToProps({ status }) {
66
return {

src/js/common/InfoStatus/InfoStatus.spec.js src/components/InfoStatus/InfoStatus.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { mapStateToProps } from 'common/InfoStatus';
1+
import { mapStateToProps } from 'components/InfoStatus';
22

3-
describe('plugins/common/InfoStatus', () => {
3+
describe('components/InfoStatus', () => {
44
it('should be correct if an info status should be displayed', () => {
55
expect(mapStateToProps({ status: { info: 'Info Status' } })).toMatchSnapshot();
66
});
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`components/InfoStatus should be correct if an info status should be displayed 1`] = `
4+
Object {
5+
"message": "Info Status",
6+
"open": true,
7+
}
8+
`;
9+
10+
exports[`components/InfoStatus should be correct if an info status should not be displayed 1`] = `
11+
Object {
12+
"message": undefined,
13+
"open": false,
14+
}
15+
`;

src/js/common/InfoStatus/index.js src/components/InfoStatus/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { connect } from 'react-redux';
2-
import StatusBar from 'common/StatusBar';
3-
import { clearStatus } from 'store/status/actions';
2+
import StatusBar from 'components/StatusBar';
3+
import { clearStatus } from 'core/status/data/actions';
44

55
export function mapStateToProps({ status }) {
66
return {

src/js/common/Loader/Loader.spec.jsx src/components/Loader/Loader.spec.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
22
import { shallow } from 'enzyme';
3-
import Loader from 'common/Loader';
3+
import Loader from 'components/Loader';
44

5-
describe('common/Loader', () => {
5+
describe('components/Loader', () => {
66
it('should render properly when loading', () => {
77
expect(
88
shallow(<Loader isLoading pastDelay />)

src/js/common/Loader/__snapshots__/Loader.spec.jsx.snap src/components/Loader/__snapshots__/Loader.spec.jsx.snap

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`common/Loader should render properly when errored 1`] = `
3+
exports[`components/Loader should render properly when errored 1`] = `
44
ShallowWrapper {
55
"length": 1,
66
Symbol(enzyme.__root__): [Circular],
@@ -51,7 +51,7 @@ ShallowWrapper {
5151
}
5252
`;
5353

54-
exports[`common/Loader should render properly when loading 1`] = `
54+
exports[`components/Loader should render properly when loading 1`] = `
5555
ShallowWrapper {
5656
"length": 1,
5757
Symbol(enzyme.__root__): [Circular],
@@ -97,7 +97,7 @@ ShallowWrapper {
9797
}
9898
`;
9999

100-
exports[`common/Loader should render properly when timed out 1`] = `
100+
exports[`components/Loader should render properly when timed out 1`] = `
101101
ShallowWrapper {
102102
"length": 1,
103103
Symbol(enzyme.__root__): [Circular],
File renamed without changes.

src/js/common/LoadingBar/LoadingBar.spec.jsx src/components/LoadingBar/LoadingBar.spec.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React from 'react';
22
import renderer from 'react-test-renderer';
3-
import { mapStateToProps, LoadingBar } from 'common/LoadingBar';
3+
import { mapStateToProps, LoadingBar } from 'components/LoadingBar';
44
import { themed } from 'utils/tests';
55

6-
describe('common/LoadingBar', () => {
6+
describe('components/LoadingBar', () => {
77
describe('Component', () => {
88
it('should render properly when loading', () => {
99
expect(

src/js/common/LoadingBar/__snapshots__/LoadingBar.spec.jsx.snap src/components/LoadingBar/__snapshots__/LoadingBar.spec.jsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`common/LoadingBar Component should render properly when loading 1`] = `
3+
exports[`components/LoadingBar Component should render properly when loading 1`] = `
44
<div
55
className="MuiLinearProgress-root-1 MuiLinearProgress-accentColor-5 MuiLinearProgress-rootQuery-12"
66
>
@@ -15,7 +15,7 @@ exports[`common/LoadingBar Component should render properly when loading 1`] = `
1515
</div>
1616
`;
1717

18-
exports[`common/LoadingBar Component should render properly when not loading 1`] = `
18+
exports[`components/LoadingBar Component should render properly when not loading 1`] = `
1919
<div
2020
className="MuiLinearProgress-root-1 MuiLinearProgress-accentColor-5 MuiLinearProgress-rootQuery-12"
2121
>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)