diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 08e280fc..00000000 --- a/.eslintrc.js +++ /dev/null @@ -1,87 +0,0 @@ -module.exports = { - extends: [ - 'airbnb', - 'plugin:import/errors', - 'plugin:import/warnings', - 'plugin:import/typescript', - 'prettier', - 'prettier/react', - 'prettier/@typescript-eslint', - ], - parser: 'babel-eslint', - plugins: ['import'], - rules: { - 'arrow-parens': 0, - 'class-methods-use-this': 0, - 'consistent-return': 0, - 'implicit-arrow-linebreak': 0, - 'import/extensions': [ - 'error', - 'ignorePackages', - { - js: 'never', - jsx: 'never', - ts: 'never', - tsx: 'never', - }, - ], - 'import/no-extraneous-dependencies': 0, - 'import/prefer-default-export': 0, - 'lines-between-class-members': ['error', 'always', {exceptAfterSingleLine: true}], - 'max-len': [ - 'error', - { - code: 120, - ignoreRegExpLiterals: true, - ignoreStrings: true, - ignoreTemplateLiterals: true, - ignoreUrls: true, - }, - ], - 'no-console': 0, - 'no-param-reassign': 0, - 'no-plusplus': 0, - 'no-underscore-dangle': [2, {allow: ['_id']}], - 'no-unused-vars': [0, {argsIgnorePattern: '^_'}], - - 'object-curly-newline': 0, - 'object-curly-spacing': 0, - 'prefer-destructuring': [ - 2, - { - array: false, - object: true, - }, - { - enforceForRenamedProperties: false, - }, - ], - }, - overrides: [ - { - files: ['*.ts', '*.tsx', '**/*.ts', '**/*.tsx'], - extends: [ - 'airbnb-typescript', - 'plugin:@typescript-eslint/recommended', - 'prettier', - 'prettier/react', - 'prettier/@typescript-eslint', - ], - parserOptions: { - project: './tsconfig.json', - }, - rules: { - 'import/no-extraneous-dependencies': 0, - 'no-underscore-dangle': [2, {allow: ['_id']}], - 'no-unused-vars': 0, - '@typescript-eslint/lines-between-class-members': ['error', 'always', {exceptAfterSingleLine: true}], - '@typescript-eslint/no-unused-vars': ['error', {argsIgnorePattern: '^_'}], - // TODO: Explicit return type - '@typescript-eslint/explicit-function-return-type': 0, - '@typescript-eslint/explicit-module-boundary-types': 0, - // TODO: Re-enable after everything is module - '@typescript-eslint/no-var-requires': 0, - }, - }, - ], -}; diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..508b277f --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,29 @@ +{ + "extends": ["plugin:@typescript-eslint/recommended", "prettier", "prettier/@typescript-eslint"], + + "parserOptions": { + "project": "./tsconfig.json" + }, + + "env": { + "browser": false, + "node": true + }, + + "rules": { + "import/no-extraneous-dependencies": 0, + "no-underscore-dangle": [2, {"allow": ["_id"]}], + "@typescript-eslint/lines-between-class-members": ["error", "always", {"exceptAfterSingleLine": true}], + "@typescript-eslint/no-unused-vars": ["error", {"argsIgnorePattern": "^_"}] + }, + "overrides": [ + { + "files": ["*.js", "*.jsx"], + "extends": ["prettier", "prettier/react"], + "parser": "babel-eslint", + "rules": { + "@typescript-eslint/no-var-requires": 0 + } + } + ] +} diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index fc1e92f8..9240abfb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,7 +4,7 @@ We love contributions from everyone. By participating in this project, you agree to abide by the thoughtbot [code of conduct]. - [code of conduct]: https://thoughtbot.com/open-source-code-of-conduct +[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct # Issue @@ -16,21 +16,21 @@ See [PULL_REQUEST_TEMPLATE.md](PULL_REQUEST_TEMPLATE.md). # Code quality -+ Be sure to use 2 spaces instead of tabulations. +- Be sure to use 2 spaces instead of tabulations. # Labels -Category | Label(s) | Color(s) ---- | --- | --- -Platform |      | #BFD4F2 -Problems |   | #EE3F46 -Severity |  | #B60205 -Type |     | #FFC274 -Feedback |   | #CC317C -Improvements |    | #5EBEFF -Help |  | #76C3A9 -Additions |  | #90C954 -Pending |      | #FBCA04 -Inactive |      | #D2DAE1 +| Category | Label(s) | Color(s) | +| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| Platform |      | #BFD4F2 | +| Problems |   | #EE3F46 | +| Severity |  | #B60205 | +| Type |     | #FFC274 | +| Feedback |   | #CC317C | +| Improvements |    | #5EBEFF | +| Help |  | #76C3A9 | +| Additions |  | #90C954 | +| Pending |      | #FBCA04 | +| Inactive |      | #D2DAE1 | **Note (if there is a need to add labels)**: in order to take a sharp screenshot of labels with Firefox: Right click the label => Inspect element => Right click the element on the inspector => Screenshot Node diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.md b/.github/ISSUE_TEMPLATE/01_bug_report.md index 3663f13e..0ab0c768 100644 --- a/.github/ISSUE_TEMPLATE/01_bug_report.md +++ b/.github/ISSUE_TEMPLATE/01_bug_report.md @@ -1,7 +1,8 @@ --- -name: "🐞 Bug Report" -about: "Report a general bug in flood" +name: '🐞 Bug Report' +about: 'Report a general bug in flood' --- + Type: Bug Report - [ ] Try to follow the update procedure described in the README and try again before opening this issue. @@ -9,36 +10,45 @@ Type: Bug Report - [ ] Please check the [Troubleshooting](https://github.com/Flood-UI/flood/wiki/Troubleshooting) wiki section. ## Your Environment + -* Version used: - + Version (stable release) `git --no-pager tag` - + Commit ID (development release) `git --no-pager log -1` -* Environment name and version: - + Node.js version `node --version` - + npm version `npm --version` - + Web browser `name and version` -* Operating System and version: + +- Version used: + - Version (stable release) `git --no-pager tag` + - Commit ID (development release) `git --no-pager log -1` +- Environment name and version: + - Node.js version `node --version` + - npm version `npm --version` + - Web browser `name and version` +- Operating System and version: ## Summary + ## Expected Behavior + ## Current Behavior + ## Possible Solution + ## Steps to Reproduce + + 1. 2. 3. 4. ## Context + diff --git a/.github/ISSUE_TEMPLATE/02_feature_request.md b/.github/ISSUE_TEMPLATE/02_feature_request.md index 5eebf082..41dae542 100644 --- a/.github/ISSUE_TEMPLATE/02_feature_request.md +++ b/.github/ISSUE_TEMPLATE/02_feature_request.md @@ -1,14 +1,16 @@ --- -name: "💡 Feature Request" -about: "Suggest an idea for this project" +name: '💡 Feature Request' +about: 'Suggest an idea for this project' --- + Type: Feature Request - [ ] If you want to contribute to the project please review the [contributing guidelines](https://github.com/Flood-UI/flood/blob/master/.github/CONTRIBUTING.md). ## Summary + - ## Idea of implementation + diff --git a/.github/ISSUE_TEMPLATE/03_security_vulnerability.md b/.github/ISSUE_TEMPLATE/03_security_vulnerability.md index 0d15d941..9905ff78 100644 --- a/.github/ISSUE_TEMPLATE/03_security_vulnerability.md +++ b/.github/ISSUE_TEMPLATE/03_security_vulnerability.md @@ -1,7 +1,8 @@ --- -name: "🔒 Security Vulnerability" -about: "Report a security vulnerability in flood" +name: '🔒 Security Vulnerability' +about: 'Report a security vulnerability in flood' --- + PLEASE DON'T DISCLOSE SECURITY-RELATED ISSUES PUBLICLY, SEE BELOW. If you discover a security vulnerability within flood, please send an e-mail to jfurrow (me@johnfurrow.com) or noraj (cybersecurity@tutamail.com). diff --git a/.github/ISSUE_TEMPLATE/04_documentation_issue.md b/.github/ISSUE_TEMPLATE/04_documentation_issue.md index 54973a9a..85a8d426 100644 --- a/.github/ISSUE_TEMPLATE/04_documentation_issue.md +++ b/.github/ISSUE_TEMPLATE/04_documentation_issue.md @@ -1,8 +1,10 @@ --- -name: "📚 Documentation Issue" +name: '📚 Documentation Issue' about: 'Report an issue or missing part in the documentation' --- + Type: Documentation Issue ## Summary + diff --git a/.github/ISSUE_TEMPLATE/05_question.md b/.github/ISSUE_TEMPLATE/05_question.md index 6f5fe9cc..2a1ea39c 100644 --- a/.github/ISSUE_TEMPLATE/05_question.md +++ b/.github/ISSUE_TEMPLATE/05_question.md @@ -1,7 +1,8 @@ --- -name: "❓ Question" -about: "Ask your questions here" +name: '❓ Question' +about: 'Ask your questions here' --- + Type: Question ## Question diff --git a/.github/ISSUE_TEMPLATE/06_discussion.md b/.github/ISSUE_TEMPLATE/06_discussion.md index 5de7e1b5..3f5957fb 100644 --- a/.github/ISSUE_TEMPLATE/06_discussion.md +++ b/.github/ISSUE_TEMPLATE/06_discussion.md @@ -1,7 +1,8 @@ --- -name: "🎙️ Discussion" -about: "Start a discussion here" +name: '🎙️ Discussion' +about: 'Start a discussion here' --- + Type: Discussion ## Discussion diff --git a/.github/ISSUE_TEMPLATE/07_support.md b/.github/ISSUE_TEMPLATE/07_support.md index 3d449bcb..0e730f76 100644 --- a/.github/ISSUE_TEMPLATE/07_support.md +++ b/.github/ISSUE_TEMPLATE/07_support.md @@ -1,5 +1,6 @@ --- -name: "🆘 Support" -about: "Ask for help on Discord" +name: '🆘 Support' +about: 'Ask for help on Discord' --- + If you need support, ask on Discord https://discord.gg/Z7yR5Uf diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index fab50043..de24bc4f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,18 +1,22 @@ ## Description + ## Related Issue + ## Motivation and Context + ## How Has This Been Tested? + @@ -20,14 +24,18 @@ ## Screenshots (if appropriate): ## Types of changes + + - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: + + - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. diff --git a/.github/labels/labels.md b/.github/labels/labels.md index 67625545..105fcd69 100644 --- a/.github/labels/labels.md +++ b/.github/labels/labels.md @@ -1,16 +1,16 @@ # Labels -Category | Label(s) | Color(s) ---- | --- | --- -Platform |      | #BFD4F2 -Problems |   | #EE3F46 -Severity |  | #B60205 -Type |     | #FFC274 -Feedback |   | #CC317C -Improvements |    | #5EBEFF -Help |  | #76C3A9 -Additions |  | #90C954 -Pending |      | #FBCA04 -Inactive |      | #D2DAE1 +| Category | Label(s) | Color(s) | +| ------------ | ------------------------------------------------------------------------------------------------------------------------------ | -------- | +| Platform |      | #BFD4F2 | +| Problems |   | #EE3F46 | +| Severity |  | #B60205 | +| Type |     | #FFC274 | +| Feedback |   | #CC317C | +| Improvements |    | #5EBEFF | +| Help |  | #76C3A9 | +| Additions |  | #90C954 | +| Pending |      | #FBCA04 | +| Inactive |      | #D2DAE1 | Note: in order to take a sharp screenshot of labels with Firefox: Right click the label => Inspect element => Right click the element on the inspector => Screenshot Node diff --git a/.jsdoc.json b/.jsdoc.json deleted file mode 100644 index a08b7453..00000000 --- a/.jsdoc.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tags": { - "allowUnknownTags": true, - "dictionaries": ["jsdoc"] - }, - "source": { - "include": ["client", "server", "shared", "package.json", "README.md"], - "includePattern": ".js$", - "excludePattern": "(node_modules/|docs)" - }, - "plugins": ["plugins/markdown"], - "templates": { - "cleverLinks": false, - "monospaceLinks": true, - "useLongnameInNav": false, - "showInheritedInNav": true - }, - "opts": { - "destination": "./docs/", - "encoding": "utf8", - "private": true, - "recurse": true, - "template": "./node_modules/minami" - } -} diff --git a/.prettierignore b/.prettierignore index e2945e0a..c3e0fb9a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,3 @@ -# Markdown and HTML -*.md -*.html - # Distribution files dist/ diff --git a/.travis.yml b/.travis.yml index 00b83f24..e5a8f34a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,14 @@ -dist: trusty +dist: focal language: node_js node_js: - - '10' - - '12' + - 'node' + - 'lts/*' - '13' matrix: fast_finish: true - allow_failures: - - node_js: 10 script: - npm run check-source-formatting - npm run lint - npm run check-types - - npm run test - npm run build + - npm run test diff --git a/CHANGELOG.md b/CHANGELOG.md index 82f66b6f..a422b249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,152 +1,159 @@ # Changelog ## [4.0.2] (November 11, 2020) -* New translations - * German, thanks to @chint95 - * Romanian, thanks to @T-z3P + +- New translations + - German, thanks to @chint95 + - Romanian, thanks to @T-z3P ## [4.0.1] (November 10, 2020) -* Fix the unreliable clear all notification button -* Bump dependencies + +- Fix the unreliable clear all notification button +- Bump dependencies ## [4.0.0] (November 9, 2020) -* Experimental multi-client support - * qBittorrent - * Transmission -* Stabilized and documented public API endpoints -* Defined and documented internal interfaces, data structures and APIs -* Better documentation for users and developers -* Full migration to TypeScript -* Reasonable test coverages for API endpoints -* Torrent creation support -* Add torrents as completed -* Dropdown selector for existing tags -* Seeding status in status filter -* Set tracker URLs of torrents -* Improved handling of rendering, updating and scrolling of torrent list - * Preliminary tests show that Flood can now handle 500,000 torrents at least in the frontend. - * Note: real-world performance depends on other factors such as method call and deserialization operations in the backend and data transfer between backend and frontend. -* Better performance, less memory and CPU consumption in both frontend and backend -* New translations - * Chinese (Traditional), thanks to @vongola12324 - * Czech, thanks to Jan Březina - * French, thanks to @Zopieux and @Mystere98 - * German, thanks to @chint95 -* Bug fixes -* Security enhancements -* Dockerfile revamp -* Native build tools no longer needed as native dependency is replaced with WebAssembly variant -* Server is packed before distribution, reduced number of dependencies in production, faster installation + +- Experimental multi-client support + - qBittorrent + - Transmission +- Stabilized and documented public API endpoints +- Defined and documented internal interfaces, data structures and APIs +- Better documentation for users and developers +- Full migration to TypeScript +- Reasonable test coverages for API endpoints +- Torrent creation support +- Add torrents as completed +- Dropdown selector for existing tags +- Seeding status in status filter +- Set tracker URLs of torrents +- Improved handling of rendering, updating and scrolling of torrent list + - Preliminary tests show that Flood can now handle 500,000 torrents at least in the frontend. + - Note: real-world performance depends on other factors such as method call and deserialization operations in the backend and data transfer between backend and frontend. +- Better performance, less memory and CPU consumption in both frontend and backend +- New translations + - Chinese (Traditional), thanks to @vongola12324 + - Czech, thanks to Jan Březina + - French, thanks to @Zopieux and @Mystere98 + - German, thanks to @chint95 +- Bug fixes +- Security enhancements +- Dockerfile revamp +- Native build tools no longer needed as native dependency is replaced with WebAssembly variant +- Server is packed before distribution, reduced number of dependencies in production, faster installation ## [3.1.0] (September 4, 2020) -* Allow to replace main tracker of torrents -* Allow adjustment of visible context menu items -* config.cli: make all configs configurable by options and env -* styles: properly set width of clipboard icon (fixes #26) -* client: hide logout button when auth is disabled -* Hungarian support (#21), thanks to @sfu420 -* New translations: - * Chinese Traditional, thanks to @vongola12324 - * Czech, thanks to @brezina.jn - * Portuguese, thanks to @Zamalor -* Security enhancements: - * Allow restriction on file operations by paths - * Do not bypass authentication token validation with disableUsersAndAuth - * server: prohibit Cross-Origin Resource Sharing - * server: auth: strictly prohibit cross-site cookie -* Minor security fixes: - * rTorrentDeserializer: avoid double unescaping - * SettingsModal: mergeObjects: prevent prototype pollution - * server: setSettings: turn inboundTransformations into a Map to validate dynamic call - * server: be explicit about client app routes - * server: cache index.html into memory -* Minor refactoring and other changes -* Bump dependencies to the latest revisions + +- Allow to replace main tracker of torrents +- Allow adjustment of visible context menu items +- config.cli: make all configs configurable by options and env +- styles: properly set width of clipboard icon (fixes #26) +- client: hide logout button when auth is disabled +- Hungarian support (#21), thanks to @sfu420 +- New translations: + - Chinese Traditional, thanks to @vongola12324 + - Czech, thanks to @brezina.jn + - Portuguese, thanks to @Zamalor +- Security enhancements: + - Allow restriction on file operations by paths + - Do not bypass authentication token validation with disableUsersAndAuth + - server: prohibit Cross-Origin Resource Sharing + - server: auth: strictly prohibit cross-site cookie +- Minor security fixes: + - rTorrentDeserializer: avoid double unescaping + - SettingsModal: mergeObjects: prevent prototype pollution + - server: setSettings: turn inboundTransformations into a Map to validate dynamic call + - server: be explicit about client app routes + - server: cache index.html into memory +- Minor refactoring and other changes +- Bump dependencies to the latest revisions ## [3.0.0] (August 25, 2020) -* BREAKING CHANGES: - * If `baseURI` is set, server will only respond to requests with baseURI. For instance, if you use `location /flood {proxy_pass http://127.0.0.1:3000;}`, you would have to change it to `location /flood {proxy_pass http://127.0.0.1:3000/flood;}`. - * Static assets now use relative paths only. It is no longer needed to recompile after `baseURI` change. - * Location of runtime files are rearranged. New default location for runtime files is `./run` folder. `tempPath` is now made configurable. - * Static assets are relocated to `./dist` folder. You have to change the path from `./server/assets` to `./dist/assets` if you serve static assets from web server. - * Flood will refuse to start if secrets are detected in static assets. Former default secret `flood` and some other weak secrets are no longer accepted. -* A command line interface is added as `config.cli.js`. Rename it to `config.js` and run `npm run start -- --help` for more details. -* With some changes, Flood is now ready for publish to `npm`. You can now use `sudo npm install -g flood` to get a ready-to-use copy of Flood, then run `flood`. It is even easier with `npx`, try `npx flood --help` now. -* Better localization: - * Flood project is now integrated with [Crowdin](https://crwd.in/flood), a renowned translation management system. It is now easier than ever to contribute your translations to Flood. - * Language will now be automatically detected from your browser by default. - * New languages are supported: `Čeština`, `Deutsch`, `italiano`, `norsk`, `Polskie`, `русский язык`, `Romanian`, `svenska`, `українська мова`, `日本語` and `اَلْعَرَبِيَّةُ` thanks to `Crowdin Machine Translation`. - * New translations for `Chinese (Traditional)` thanks to @vongola12324. - * New translations for `Dutch` thanks to @NLxDoDge. - * New translations for `Portuguese` thanks to @MiguelNdeCarvalho. -* Support for touch and smaller screen devices: - * Sidebar is able to be collapsed via a button. It is collapsed by default when screen width is lower than `720px`. - * Modals (Settings, Torrent Details, Add Torrent, etc.) are tuned for smaller screen devices. - * It is now possible to open context (right click) menu on iOS/Safari devices by long pressing the item. - * Drag and drop is now possible for touch devices. You can now adjust the order of columns in Settings on touch devices. - * Widths of columns are now adjustable on touch devices. (condensed view) -* Dark color scheme support: - * Flood now automatically switches between light and dark color scheme based on your system settings. -* XML special chars (`&`, `<`, `>`, `'`, `"`) are properly handled. For instance, escaped chars like `&` will be properly displayed as `&` instead of `&`. File operations on torrent with special chars no longer fail. -* `squashfs` and `tmpfs` mount points are now excluded by default in disk usage. This hopefully makes sure that useless system mounts won't spam the list. -* `More Info` button in expanded view is removed. -* More dependencies are bumped to the latest revisions. + +- BREAKING CHANGES: + - If `baseURI` is set, server will only respond to requests with baseURI. For instance, if you use `location /flood {proxy_pass http://127.0.0.1:3000;}`, you would have to change it to `location /flood {proxy_pass http://127.0.0.1:3000/flood;}`. + - Static assets now use relative paths only. It is no longer needed to recompile after `baseURI` change. + - Location of runtime files are rearranged. New default location for runtime files is `./run` folder. `tempPath` is now made configurable. + - Static assets are relocated to `./dist` folder. You have to change the path from `./server/assets` to `./dist/assets` if you serve static assets from web server. + - Flood will refuse to start if secrets are detected in static assets. Former default secret `flood` and some other weak secrets are no longer accepted. +- A command line interface is added as `config.cli.js`. Rename it to `config.js` and run `npm run start -- --help` for more details. +- With some changes, Flood is now ready for publish to `npm`. You can now use `sudo npm install -g flood` to get a ready-to-use copy of Flood, then run `flood`. It is even easier with `npx`, try `npx flood --help` now. +- Better localization: + - Flood project is now integrated with [Crowdin](https://crwd.in/flood), a renowned translation management system. It is now easier than ever to contribute your translations to Flood. + - Language will now be automatically detected from your browser by default. + - New languages are supported: `Čeština`, `Deutsch`, `italiano`, `norsk`, `Polskie`, `русский язык`, `Romanian`, `svenska`, `українська мова`, `日本語` and `اَلْعَرَبِيَّةُ` thanks to `Crowdin Machine Translation`. + - New translations for `Chinese (Traditional)` thanks to @vongola12324. + - New translations for `Dutch` thanks to @NLxDoDge. + - New translations for `Portuguese` thanks to @MiguelNdeCarvalho. +- Support for touch and smaller screen devices: + - Sidebar is able to be collapsed via a button. It is collapsed by default when screen width is lower than `720px`. + - Modals (Settings, Torrent Details, Add Torrent, etc.) are tuned for smaller screen devices. + - It is now possible to open context (right click) menu on iOS/Safari devices by long pressing the item. + - Drag and drop is now possible for touch devices. You can now adjust the order of columns in Settings on touch devices. + - Widths of columns are now adjustable on touch devices. (condensed view) +- Dark color scheme support: + - Flood now automatically switches between light and dark color scheme based on your system settings. +- XML special chars (`&`, `<`, `>`, `'`, `"`) are properly handled. For instance, escaped chars like `&` will be properly displayed as `&` instead of `&`. File operations on torrent with special chars no longer fail. +- `squashfs` and `tmpfs` mount points are now excluded by default in disk usage. This hopefully makes sure that useless system mounts won't spam the list. +- `More Info` button in expanded view is removed. +- More dependencies are bumped to the latest revisions. ## [2.0.0] (August 5, 2020) -* BREAKING CHANGES: - * Bump dependencies to the latest version if possible - * Node 12 or later is now required -* Supports connecting to multiple rtorrent instances (one per user) - * Moved rtorrent configuration to user database - * Prompts user for connection details in UI when can't connect to rtorrent -* Changed `/list/` route to `/overview/` -* Reorganized and renamed component source files -* Removed verbose logging from `HistoryEra` -* Check existing feed items against new download rules -* Switch URL and Label textboxes in Add Feed form to match the Download Rules form -* Rate-limit the SCGI calls to rTorrent - * Sends only one call at a time - * Sends at most one call every 250 miliseconds -* Implement "actity stream" - * The Flood client no longer polls the Flood server on an interval. Instead, - the Flood server polls rTorrent on a more regular interval and emits changes - via an event-stream. This significantly reduces data usage on the Flood client - * Stream covers torrent list, transfer rate summary & history, - torrent taxonomy, and notification count. -* Close event stream after the window/tab has been inactive for 30 seconds -* Refactor development experience, using `Webpack` & `WebpackDevServer` -* Require users to build static assets again -* Simplify peer geo flag handling - * Flag images now serves as static asset -* moveTorrents: Allow hash check to be skipped by user -* Add an option to completely disable users and authentication -* server: Takes baseURI into account for routes and assets -* torrentListPropMap: use d.hashing= instead of d.is_hash_checking= - * Torrents queued for checking are now shown -* sidebar: Add Checking filter view + +- BREAKING CHANGES: + - Bump dependencies to the latest version if possible + - Node 12 or later is now required +- Supports connecting to multiple rtorrent instances (one per user) + - Moved rtorrent configuration to user database + - Prompts user for connection details in UI when can't connect to rtorrent +- Changed `/list/` route to `/overview/` +- Reorganized and renamed component source files +- Removed verbose logging from `HistoryEra` +- Check existing feed items against new download rules +- Switch URL and Label textboxes in Add Feed form to match the Download Rules form +- Rate-limit the SCGI calls to rTorrent + - Sends only one call at a time + - Sends at most one call every 250 miliseconds +- Implement "actity stream" + - The Flood client no longer polls the Flood server on an interval. Instead, + the Flood server polls rTorrent on a more regular interval and emits changes + via an event-stream. This significantly reduces data usage on the Flood client + - Stream covers torrent list, transfer rate summary & history, + torrent taxonomy, and notification count. +- Close event stream after the window/tab has been inactive for 30 seconds +- Refactor development experience, using `Webpack` & `WebpackDevServer` +- Require users to build static assets again +- Simplify peer geo flag handling + - Flag images now serves as static asset +- moveTorrents: Allow hash check to be skipped by user +- Add an option to completely disable users and authentication +- server: Takes baseURI into account for routes and assets +- torrentListPropMap: use d.hashing= instead of d.is_hash_checking= + - Torrents queued for checking are now shown +- sidebar: Add Checking filter view ## [1.0.0] (April 21, 2017) -* First "official" release -* Change log and semver versioning (finally) -* Control basic rTorrent settings via web UI - * Transfer rate limiting - * Connection settings - * Resource utilization -* Add torrents via URLs or files -* User authentication -* UI translations (only en, fr, and nl) -* Custom torrent tags -* Customizable torrent list - * "Expanded" and "condensed" views - * Customizable torrent detail columns -* Basic torrent list filtering (by status, tag, and tracker) -* Auto-download torrents from RSS feeds -[Unreleased]:https://github.com/Flood-UI/flood/compare/v1.0.0...HEAD -[1.0.0]:https://github.com/Flood-UI/flood/compare/ae520c0a33ffb4ae6f21e47bc6f7e6007dd1e6dc...v1.0.0 -[2.0.0]:https://github.com/jesec/flood/compare/v1.0.0...v2.0.0 -[3.0.0]:https://github.com/jesec/flood/compare/v2.0.0...v3.0.0 -[3.1.0]:https://github.com/jesec/flood/compare/v3.0.0...v3.1.0 -[4.0.0]:https://github.com/jesec/flood/compare/v3.1.0...v4.0.0 -[4.0.1]:https://github.com/jesec/flood/compare/v4.0.0...v4.0.1 -[4.0.2]:https://github.com/jesec/flood/compare/v4.0.1...v4.0.2 +- First "official" release +- Change log and semver versioning (finally) +- Control basic rTorrent settings via web UI + - Transfer rate limiting + - Connection settings + - Resource utilization +- Add torrents via URLs or files +- User authentication +- UI translations (only en, fr, and nl) +- Custom torrent tags +- Customizable torrent list + - "Expanded" and "condensed" views + - Customizable torrent detail columns +- Basic torrent list filtering (by status, tag, and tracker) +- Auto-download torrents from RSS feeds + +[unreleased]: https://github.com/Flood-UI/flood/compare/v1.0.0...HEAD +[1.0.0]: https://github.com/Flood-UI/flood/compare/ae520c0a33ffb4ae6f21e47bc6f7e6007dd1e6dc...v1.0.0 +[2.0.0]: https://github.com/jesec/flood/compare/v1.0.0...v2.0.0 +[3.0.0]: https://github.com/jesec/flood/compare/v2.0.0...v3.0.0 +[3.1.0]: https://github.com/jesec/flood/compare/v3.0.0...v3.1.0 +[4.0.0]: https://github.com/jesec/flood/compare/v3.1.0...v4.0.0 +[4.0.1]: https://github.com/jesec/flood/compare/v4.0.0...v4.0.1 +[4.0.2]: https://github.com/jesec/flood/compare/v4.0.1...v4.0.2 diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 25e980c3..00000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at me@johnfurrow.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/README.md b/README.md index 2a9ded8c..bda4879d 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,9 @@ Flood is a monitoring service for various torrent clients. It's a Node.js service that communicates with your favorite torrent client and serves a decent web UI for administration. This project is based on the [original Flood project](https://github.com/Flood-UI/flood). #### Supported Clients + | Client | Support | -|--------------------------------------------------------------|--------------------------------------| +| ------------------------------------------------------------ | ------------------------------------ | | [rTorrent](https://github.com/rakshasa/rtorrent) | Stable and Tested :white_check_mark: | | [qBittorrent](https://github.com/qbittorrent/qBittorrent) | Experimental :alembic: | | [Transmission](https://github.com/transmission/transmission) | Experimental :alembic: | @@ -26,6 +27,7 @@ Check out the [Wiki](https://github.com/jesec/flood/wiki) for more information. ### Pre-Requisites Install [Node.js runtime](https://nodejs.org/). Flood tracks `Current` and provides support to `Active LTS` as well. + - Debian, Ubuntu and RHEL-based distributions users can install latest `nodejs` from [NodeSource](https://github.com/nodesource/distributions) software repository. - Windows and MacOS users may use installer. diff --git a/SECURITY.md b/SECURITY.md index 3b0257f2..863b6931 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ ## Supported Versions -| Version | Supported | +| Version | Supported | | ------------------------ | ------------------ | | HEAD of master | :white_check_mark: | | Latest released revision | :white_check_mark: | @@ -12,7 +12,7 @@ Flood does NOT provide LTS support. Older revisions are deprecated as soon as a Generally only the latest revision (`HEAD of master`) is supported. However, [issue tracker](https://github.com/jesec/flood/issues) is still open to reports from users of the `Latest released revision`. In rare circumstances, if there is a vulnerability that requires urgent attention, and, if the `HEAD of master` is occupied with changes which maintainers are not comfortable to release, relevant changes may be backported to the `Latest released revision` to release a patch revision. -You are advised to upgrade to the latest release as soon as possible. +You are advised to upgrade to the latest release as soon as possible. ## Reporting a Vulnerability @@ -20,7 +20,7 @@ If you discover a security vulnerability within Flood, please send an e-mail to Suggestions for general security enhancements and/or mitigations shall be reported to [issue tracker](https://github.com/jesec/flood/issues). -If you are unsure about the severity, send an email first. +If you are unsure about the severity, send an email first. ## More information diff --git a/client/.eslintrc.js b/client/.eslintrc.js deleted file mode 100644 index 639a886f..00000000 --- a/client/.eslintrc.js +++ /dev/null @@ -1,50 +0,0 @@ -const path = require('path'); - -module.exports = { - extends: '../.eslintrc', - env: { - browser: 1, - node: 0, - }, - globals: { - global: 'writable', - process: 'writable', - window: 'writable', - }, - rules: { - 'import/no-extraneous-dependencies': 0, - 'no-restricted-imports': [ - 'error', - { - patterns: ['**/config', '**/server/**/*'], - }, - ], - 'no-restricted-modules': [ - 'error', - { - patterns: ['**/server/**/*'], - }, - ], - // TODO: Enable a11y features - 'jsx-a11y/click-events-have-key-events': 0, - 'jsx-a11y/control-has-associated-label': 0, - 'jsx-a11y/label-has-associated-control': 0, - 'jsx-a11y/label-has-for': 0, - 'jsx-a11y/mouse-events-have-key-events': 0, - 'jsx-a11y/no-noninteractive-element-interactions': 0, - 'jsx-a11y/no-static-element-interactions': 0, - 'no-console': [2, {allow: ['warn', 'error']}], - 'react/destructuring-assignment': 0, - 'react/jsx-props-no-spreading': 0, - 'react/jsx-uses-react': 0, - 'react/react-in-jsx-scope': 0, - 'react/static-property-placement': [2, 'static public field'], - }, - settings: { - 'import/resolver': { - webpack: { - config: path.join(__dirname, 'config/webpack.config.dev.js'), - }, - }, - }, -}; diff --git a/client/config/.eslintrc.js b/client/config/.eslintrc.js deleted file mode 100644 index b804850f..00000000 --- a/client/config/.eslintrc.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - env: { - browser: 0, - node: 1, - }, - rules: { - 'no-console': 0, - 'global-require': 0, - }, -}; diff --git a/client/config/jest/cssTransform.js b/client/config/jest/cssTransform.js deleted file mode 100644 index 56746693..00000000 --- a/client/config/jest/cssTransform.js +++ /dev/null @@ -1,12 +0,0 @@ -// This is a custom Jest transformer turning style imports into empty objects. -// http://facebook.github.io/jest/docs/tutorial-webpack.html - -module.exports = { - process() { - return 'module.exports = {};'; - }, - getCacheKey() { - // The output is always the same. - return 'cssTransform'; - }, -}; diff --git a/client/config/jest/fileTransform.js b/client/config/jest/fileTransform.js deleted file mode 100644 index 3166508c..00000000 --- a/client/config/jest/fileTransform.js +++ /dev/null @@ -1,10 +0,0 @@ -const path = require('path'); - -// This is a custom Jest transformer turning file imports into filenames. -// http://facebook.github.io/jest/docs/tutorial-webpack.html - -module.exports = { - process(src, filename) { - return `module.exports = ${JSON.stringify(path.basename(filename))};`; - }, -}; diff --git a/client/scripts/.eslintrc.js b/client/scripts/.eslintrc.js deleted file mode 100644 index b804850f..00000000 --- a/client/scripts/.eslintrc.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = { - env: { - browser: 0, - node: 1, - }, - rules: { - 'no-console': 0, - 'global-require': 0, - }, -}; diff --git a/client/src/.eslintrc.json b/client/src/.eslintrc.json new file mode 100644 index 00000000..1df21ecb --- /dev/null +++ b/client/src/.eslintrc.json @@ -0,0 +1,67 @@ +{ + "extends": [ + "react-app", + "airbnb-typescript", + "plugin:@typescript-eslint/recommended", + "prettier", + "prettier/@typescript-eslint", + "prettier/react" + ], + + "parserOptions": { + "project": "./tsconfig.json" + }, + + "env": { + "browser": true, + "node": false + }, + + "globals": { + "global": "writable", + "process": "writable", + "window": "writable" + }, + + "rules": { + "import/no-extraneous-dependencies": 0, + "no-restricted-imports": [ + "error", + { + "patterns": ["**/config", "**/server/**/*"] + } + ], + "no-restricted-modules": [ + "error", + { + "patterns": ["**/config", "**/server/**/*"] + } + ], + // TODO: Enable a11y features + "jsx-a11y/click-events-have-key-events": 0, + "jsx-a11y/control-has-associated-label": 0, + "jsx-a11y/label-has-associated-control": 0, + "jsx-a11y/label-has-for": 0, + "jsx-a11y/mouse-events-have-key-events": 0, + "jsx-a11y/no-noninteractive-element-interactions": 0, + "jsx-a11y/no-static-element-interactions": 0, + "no-console": [2, {"allow": ["warn", "error"]}], + "no-underscore-dangle": [2, {"allow": ["_id"]}], + "react/destructuring-assignment": 0, + "react/jsx-props-no-spreading": 0, + "react/jsx-uses-react": 0, + "react/react-in-jsx-scope": 0, + "react/static-property-placement": [2, "static public field"], + "@typescript-eslint/lines-between-class-members": ["error", "always", {"exceptAfterSingleLine": true}], + // TODO: Explicit return type + "@typescript-eslint/explicit-function-return-type": 0, + "@typescript-eslint/explicit-module-boundary-types": 0 + }, + "settings": { + "import/resolver": { + "webpack": { + "config": "client/config/webpack.config.dev.js" + } + } + } +} diff --git a/client/src/index.html b/client/src/index.html index 7e9d9aa2..44cc0c95 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -1,23 +1,19 @@ - + +
+ + + + + +