Skip to content

Commit

Permalink
feat: sentry integration (#385)
Browse files Browse the repository at this point in the history
* feat: sentry support

* ci: depscheck
  • Loading branch information
AuHau authored Jun 16, 2022
1 parent 2edf99c commit 109e07b
Show file tree
Hide file tree
Showing 13 changed files with 406 additions and 70 deletions.
4 changes: 3 additions & 1 deletion .depcheckrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
"assert",
"buffer",
"crypto*",
"stream*"
"stream*",
"env-paths",
"open"
]
}
8 changes: 8 additions & 0 deletions .github/workflows/publish_npmjs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ jobs:
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
sourcemaps: ./build/static/js
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ The Bee Dashboard runs in development mode on [http://localhost:3031/](http://lo

> Setting the `REACT_APP_DEV_MODE=1` environment variable, or opening Bee Dashboard with the query string `?devMode=1` loosens some checks. This makes it possible to develop Bee Dashboard without having connected peers and chequebook properly set up, effectively supporting the dev mode of Bee itself.
#### Bee Desktop development

If you want to develop Bee Dashboard in the Bee Desktop mode, then spin up `bee-desktop` to the point where you see Bee Dashboard (eq. install Bee etc.) and:

```sh
echo "REACT_APP_BEE_DESKTOP_URL=http://localhost:3000" > .env.development.local
npm start
npm run desktop # This will inject the API key to the Dashboard
```

## Contribute

There are some ways you can make this module better:
Expand Down
14 changes: 14 additions & 0 deletions desktop.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env node

import envPaths from 'env-paths'
import open from 'open'

import { readFile } from 'node:fs/promises'
import { join } from 'node:path'

const paths = envPaths('bee-desktop')
const apiKey = await readFile(join(paths.data, 'api-key.txt'), {encoding: 'utf-8'})
const url = `http://localhost:3001/?v=${apiKey}#/`

console.log('Opening: ' + url)
await open(url)
186 changes: 185 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
"@material-ui/core": "4.12.3",
"@material-ui/icons": "4.11.2",
"@material-ui/lab": "4.0.0-alpha.57",
"@sentry/react": "^7.1.1",
"@sentry/tracing": "^7.1.1",
"assert": "^2.0.0",
"axios": "0.24.0",
"bignumber.js": "9.0.1",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"crypto": "npm:crypto-browserify",
"crypto-browserify": "^3.12.0",
"ethereumjs-wallet": "^1.0.2",
"ethers": "^5.6.4",
"file-saver": "^2.0.5",
Expand Down Expand Up @@ -92,6 +94,7 @@
"babel-plugin-tsconfig-paths": "1.0.2",
"cors": "^2.8.5",
"depcheck": "^1.4.3",
"env-paths": "^3.0.0",
"eslint": "8.17.0 ",
"eslint-config-prettier": "8.5.0",
"eslint-config-react-app": "7.0.1",
Expand All @@ -105,6 +108,7 @@
"eslint-plugin-testing-library": "5.5.1",
"express": "^4.17.3",
"file-loader": "6.2.0",
"open": "^8.4.0",
"prettier": "2.4.1",
"react-scripts": "^5.0.1",
"ts-node": "^10.8.1",
Expand All @@ -120,6 +124,7 @@
"scripts": {
"prepare": "npm run build",
"start": "react-scripts start",
"desktop": "node ./desktop.mjs",
"build": "react-scripts build",
"build:component": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' webpack --mode=production",
"compile:types": "tsc --project tsconfig.lib.json --emitDeclarationOnly --declaration",
Expand Down
Loading

0 comments on commit 109e07b

Please sign in to comment.