Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
feat(OAuth): Add support for OAuth (#82)
Browse files Browse the repository at this point in the history
* feat(OAuth): Rework the main flow around OAuth
* feat(OAuth): 
BREAKING CHANGE: You don't need to provide your API key nor your username now, just login with Bungie.
  • Loading branch information
louis-bompart authored Jul 15, 2019
1 parent fd249f4 commit b878265
Show file tree
Hide file tree
Showing 29 changed files with 9,403 additions and 11,979 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,8 @@ dist/
# Packaging directory
bin/

out/
.webpack/

# Icon directory
generated_icons/
generated_icons/
51 changes: 16 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ node_js:
jobs:
include:
- stage: Test
if: tag IS blank
if: tag IS blank
before_install:
- sudo apt-get install libsecret-1-dev
- sudo apt-get install fakeroot
script:
- npm run lint
- npm test
- npm run coverage
- npm run build
- npm run make
# Define the release stage that runs semantic-release
- stage: Create Release
if: (NOT type IN (pull_request)) AND (branch = master)
Expand All @@ -23,55 +26,33 @@ jobs:
- stage: Build and Deploy
if: (NOT type IN (pull_request)) AND tag IS present
os: linux
before_script:
- npm install -g pkg
script:
- npm run build
before_deploy:
- pkg -o "start" --targets node10-linux-x64 "./dist/index.js"
- node tools/generateReleaseHierarchy.js
- zip -r "$TRAVIS_OS_NAME.zip" ./discord-ghost/*
before_install:
- sudo apt-get install libsecret-1-dev
- sudo apt-get install fakeroot
before_deploy: echo "{\"apiKey\":\"$BUNGIE_API_KEY\",\"clientId\":\"$BUNGIE_CLIENT_ID\",\"clientSecret\":\"$BUNGIE_CLIENT_SECRET\"}" > config/bungieApp.json
deploy:
provider: releases
api_key: "$GH_TOKEN"
provider: script
skip_cleanup: true
file: "$TRAVIS_OS_NAME.zip"
script: npm run publish
on:
all_branches: true # We rely on the stage condition.
- stage: Build and Deploy
if: tag IS present
os: osx
before_script:
- npm install -g pkg
script:
- npm run build
before_deploy:
- npm run build
- pkg -o "start" --targets node10-macos-x64 "./dist/index.js"
- node tools/generateReleaseHierarchy.js
- zip -r "$TRAVIS_OS_NAME.zip" ./discord-ghost/*
before_deploy: echo "{\"apiKey\":\"$BUNGIE_API_KEY\",\"clientId\":\"$BUNGIE_CLIENT_ID\",\"clientSecret\":\"$BUNGIE_CLIENT_SECRET\"}" > config/bungieApp.json
deploy:
provider: releases
api_key: "$GH_TOKEN"
provider: script
skip_cleanup: true
file: "$TRAVIS_OS_NAME.zip"
script: npm run publish
on:
all_branches: true # We rely on the stage condition.
- stage: Build and Deploy
if: (NOT type IN (pull_request)) AND tag IS present
os: windows
before_script:
- npm install -g pkg
script:
- npm run build
before_deploy:
- choco install zip
- pkg -o "start" --targets node10-win-x64 "./dist/index.js"
- node tools/generateReleaseHierarchy.js
- zip -r "$TRAVIS_OS_NAME.zip" ./discord-ghost/*
before_deploy: echo "{\"apiKey\":\"$BUNGIE_API_KEY\",\"clientId\":\"$BUNGIE_CLIENT_ID\",\"clientSecret\":\"$BUNGIE_CLIENT_SECRET\"}" > config/bungieApp.json
deploy:
provider: script
skip_cleanup: true
script: node tools/releaseWindows.js "$GH_TOKEN"
script: npm run publish
on:
all_branches: true # We rely on the stage condition.
14 changes: 8 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceFolder}\\dist\\index.js",
"preLaunchTask": "tsc: build - tsconfig.json",
"sourceMaps": true,
"console": "integratedTerminal",
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
"name": "Electron Main",
"timeout": 60000,
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-nix",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron-forge-vscode-win.cmd"
},
// runtimeArgs will be passed directly to your Electron application
"cwd": "${workspaceFolder}"
}
]
}
5 changes: 5 additions & 0 deletions config/bungieApp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"apiKey": "4c71c1518a7541edabc7b1d4ba7cd5e8",
"clientId": "27342",
"clientSecret": "wtkPxF2Oh5TXfZC7nPutGN4PkHMugjsZE.88EpECx5U"
}
Binary file added config/favicon.ico
Binary file not shown.
53 changes: 53 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
module.exports = {
packagerConfig: {
asar: true
},
publisher: [
{
name: "@electron-forge/publisher-github",
config: {
repository: {
owner: "brakacai",
name: "discord-ghost"
}
}
}
],
makers: [
{
name: "@electron-forge/maker-squirrel",
config: {
name: "discord_ghost"
}
},
{
name: "@electron-forge/maker-deb",
config: {
maintainer: "Louis Bompart",
homepage: "https://github.com/brakacai/discord-ghost"
}
},
{
name: "@electron-forge/maker-dmg",
config: {}
}
],
plugins: [
[
"@electron-forge/plugin-webpack",
{
mainConfig: "./webpack.main.config.js",
renderer: {
config: "./webpack.renderer.config.js",
entryPoints: [
{
html: "./src/index.html",
js: "./src/renderer.js",
name: "main_window"
}
]
}
}
]
]
};
Loading

0 comments on commit b878265

Please sign in to comment.