From ec7faeb9972bcc49ab873ed64a1dc6889e9900af Mon Sep 17 00:00:00 2001 From: jeffvli Date: Thu, 21 Apr 2022 19:27:12 -0700 Subject: [PATCH] Set up defaults --- .eslintrc.js | 4 ++ CODE_OF_CONDUCT.md | 76 ----------------------------------- package-lock.json | 54 +++++++++++++++---------- package.json | 56 ++++++++++---------------- release/app/package-lock.json | 4 +- release/app/package.json | 11 +++-- src/main/main.ts | 3 ++ 7 files changed, 69 insertions(+), 139 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md diff --git a/.eslintrc.js b/.eslintrc.js index 9000d9e..7737150 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,6 +7,10 @@ module.exports = { // Since React 17 and typescript 4.1 you can safely disable the rule 'react/react-in-jsx-scope': 'off', '@typescript-eslint/no-non-null-assertion': 'off', + 'import/prefer-default-export': 'off', + 'react/jsx-props-no-spreading': 'off', + 'jsx-a11y/media-has-caption': 'off', + '@typescript-eslint/no-explicit-any': 'off', }, parserOptions: { ecmaVersion: 2020, diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index 2562267..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,76 +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, sex characteristics, gender identity and expression, -level of experience, education, socio-economic status, 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 electronreactboilerplate@gmail.com. All -complaints will be reviewed and investigated and will result in a response that -is deemed necessary and 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 https://www.contributor-covenant.org/version/1/4/code-of-conduct.html - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see -https://www.contributor-covenant.org/faq diff --git a/package-lock.json b/package-lock.json index 3323be7..9f2b262 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "electron-react-boilerplate", + "name": "sonixd", "requires": true, "lockfileVersion": 1, "dependencies": { @@ -1854,6 +1854,16 @@ "@types/react": "*" } }, + "@types/react-lazy-load-image-component": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@types/react-lazy-load-image-component/-/react-lazy-load-image-component-1.5.2.tgz", + "integrity": "sha512-4NLJsMJVrMv18FuMIkUUBVj/PH9A+BvLKrZC75EWiEFn1IsMrZHgL1tVKw5QBfoa0Qjz6SkWIzEvwcyZ8PgnIg==", + "dev": true, + "requires": { + "@types/react": "*", + "csstype": "^3.0.2" + } + }, "@types/react-test-renderer": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/@types/react-test-renderer/-/react-test-renderer-17.0.1.tgz", @@ -2848,6 +2858,20 @@ "@babel/runtime": "^7.7.2", "cosmiconfig": "^6.0.0", "resolve": "^1.12.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } + } } }, "babel-preset-current-node-syntax": { @@ -3815,18 +3839,6 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, - "cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - } - }, "crc": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", @@ -10165,6 +10177,14 @@ "loose-envify": "^1.1.0" } }, + "react-audio-player": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-audio-player/-/react-audio-player-0.17.0.tgz", + "integrity": "sha512-aCZgusPxA9HK7rLZcTdhTbBH9l6do9vn3NorgoDZRxRxJlOy9uZWzPaKjd7QdcuP2vXpxGA/61JMnnOEY7NXeA==", + "requires": { + "prop-types": "^15.7.2" + } + }, "react-dom": { "version": "18.0.0", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.0.0.tgz", @@ -10242,14 +10262,6 @@ "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" } }, - "react-slider": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/react-slider/-/react-slider-2.0.0.tgz", - "integrity": "sha512-r2Z4VkGvtQXbmiANEYzYdCnb4SnTRpgog1QZa++Wl1x1n5vRL3QOufyf52VVkcaLQCLk5m0WPMwGNvRqcBDtmw==", - "requires": { - "prop-types": "^15.8.1" - } - }, "react-spaces": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/react-spaces/-/react-spaces-0.3.2.tgz", diff --git a/package.json b/package.json index 15306a1..0275826 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,6 @@ { - "name": "electron-react-boilerplate", + "name": "sonixd", + "productName": "Sonixd", "description": "A foundation for scalable desktop apps", "scripts": { "build": "concurrently \"npm run build:main\" \"npm run build:renderer\"", @@ -31,8 +32,9 @@ ] }, "build": { - "productName": "ElectronReact", - "appId": "org.erb.ElectronReact", + "productName": "Sonixd", + "appId": "org.erb.sonixd", + "artifactName": "${productName}-${version}-${os}-${arch}.${ext}", "asar": true, "asarUnpack": "**\\*.{node,dll}", "files": [ @@ -71,13 +73,16 @@ }, "win": { "target": [ - "nsis" + "nsis", + "zip" ] }, "linux": { "target": [ - "AppImage" + "AppImage", + "tar.xz" ], + "icon": "assets/icons/placeholder.png", "category": "Development" }, "directories": { @@ -90,47 +95,29 @@ ], "publish": { "provider": "github", - "owner": "electron-react-boilerplate", - "repo": "electron-react-boilerplate" + "owner": "jeffvli", + "repo": "sonixd" } }, "repository": { "type": "git", - "url": "git+https://github.com/electron-react-boilerplate/electron-react-boilerplate.git" + "url": "git+https://github.com/jeffvli/sonixd.git" }, "author": { - "name": "Electron React Boilerplate Maintainers", - "email": "electronreactboilerplate@gmail.com", - "url": "https://electron-react-boilerplate.js.org" + "name": "jeffvli", + "url": "https://github.com/jeffvli/" }, - "contributors": [ - { - "name": "Amila Welihinda", - "email": "amilajack@gmail.com", - "url": "https://github.com/amilajack" - }, - { - "name": "John Tran", - "email": "jptran318@gmail.com", - "url": "https://github.com/jooohhn" - } - ], - "license": "MIT", + "contributors": [], + "license": "GPL-3.0", "bugs": { - "url": "https://github.com/electron-react-boilerplate/electron-react-boilerplate/issues" + "url": "https://github.com/jeffvli/sonixd/issues" }, "keywords": [ "electron", - "boilerplate", "react", - "typescript", - "ts", - "sass", - "webpack", - "hot", - "reload" + "typescript" ], - "homepage": "https://github.com/electron-react-boilerplate/electron-react-boilerplate#readme", + "homepage": "https://github.com/jeffvli/sonixd", "jest": { "testURL": "http://localhost/", "testEnvironment": "jsdom", @@ -168,6 +155,7 @@ "@types/node": "17.0.23", "@types/react": "^17.0.43", "@types/react-dom": "^17.0.14", + "@types/react-lazy-load-image-component": "^1.5.2", "@types/react-test-renderer": "^17.0.1", "@types/terser-webpack-plugin": "^5.0.4", "@types/webpack-bundle-analyzer": "^4.4.1", @@ -239,10 +227,10 @@ "electron-updater": "^4.6.5", "history": "^5.3.0", "react": "^18.0.0", + "react-audio-player": "^0.17.0", "react-dom": "^18.0.0", "react-lazy-load-image-component": "^1.5.4", "react-router-dom": "^6.3.0", - "react-slider": "^2.0.0", "react-spaces": "^0.3.2" }, "devEngines": { diff --git a/release/app/package-lock.json b/release/app/package-lock.json index 82a4bba..e66ebae 100644 --- a/release/app/package-lock.json +++ b/release/app/package-lock.json @@ -1,5 +1,5 @@ { - "name": "electron-react-boilerplate", - "version": "4.5.0", + "name": "sonixd", + "version": "1.0.0-alpha1", "lockfileVersion": 1 } diff --git a/release/app/package.json b/release/app/package.json index 1ff9bc9..9deecca 100644 --- a/release/app/package.json +++ b/release/app/package.json @@ -1,12 +1,11 @@ { - "name": "electron-react-boilerplate", - "version": "4.5.0", - "description": "A foundation for scalable desktop apps", + "name": "sonixd", + "version": "1.0.0-alpha1", + "description": "A full-featured Subsonic/Jellyfin compatible desktop client", "main": "./dist/main/main.js", "author": { - "name": "Electron React Boilerplate Maintainers", - "email": "electronreactboilerplate@gmail.com", - "url": "https://github.com/electron-react-boilerplate" + "name": "jeffvli", + "url": "https://github.com/jeffvli/" }, "scripts": { "electron-rebuild": "node -r ts-node/register ../../.erb/scripts/electron-rebuild.js", diff --git a/src/main/main.ts b/src/main/main.ts index c3a5658..9da3d92 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -76,6 +76,9 @@ const createWindow = async () => { frame: false, icon: getAssetPath('icon.png'), webPreferences: { + nodeIntegration: true, + contextIsolation: true, + devTools: true, preload: app.isPackaged ? path.join(__dirname, 'preload.js') : path.join(__dirname, '../../.erb/dll/preload.js'),