Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd484f42

Browse files
committed
sentry setup progress
1 parent9274d0b commitd484f42

File tree

16 files changed

+371
-30
lines changed

16 files changed

+371
-30
lines changed

‎package-lock.json

Lines changed: 340 additions & 7 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"watch":"tsc -watch -p ./"
3232
},
3333
"dependencies": {
34+
"@sentry/electron":"^1.2.0",
3435
"@sentry/node":"^5.11.0",
3536
"chokidar":"^3.3.0",
3637
"dotenv":"^8.2.0",
@@ -49,6 +50,7 @@
4950
"eslint":"^6.8.0",
5051
"eslint-config-prettier":"^6.9.0",
5152
"eslint-plugin-prettier":"^3.1.2",
53+
"graphql":"^14.5.8",
5254
"prettier":"^1.19.1",
5355
"ts-jest":"^24.3.0",
5456
"typescript":"^3.7.4",

‎src/actions/tutorialConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as vscode from 'vscode'
44
import{COMMANDS}from'../editor/commands'
55
importlanguageMapfrom'../editor/languageMap'
66
import*asgitfrom'../services/git'
7-
importonErrorfrom'services/sentry/onError'
7+
importonErrorfrom'../services/sentry/onError'
88

99
interfaceTutorialConfigParams{
1010
config:T.TutorialConfig

‎src/services/git/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
importnodefrom'../node'
22
importloggerfrom'../logger'
3-
importonErrorfrom'services/sentry/onError'
3+
importonErrorfrom'../sentry/onError'
44

55
constgitOrigin='coderoad'
66

‎src/services/node/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as fs from 'fs'
33
import{join}from'path'
44
import{promisify}from'util'
55
import*asvscodefrom'vscode'
6-
importonErrorfrom'services/sentry/onError'
6+
importonErrorfrom'../sentry/onError'
77

88
constasyncExec=promisify(cpExec)
99

‎src/services/sentry/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import*assentryfrom'@sentry/node'
1+
import{init}from'@sentry/node'
22
importenvironmentfrom'../../environment'
33

4-
sentry.init({
4+
init({
55
dsn:'https://df4a6ae19e8b44ed9a87ae4432dab9df@sentry.io/1889368',
66
environment:environment.NODE_ENV,
77
})

‎src/services/sentry/onError.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import*assentryfrom'@sentry/node'
2-
import{Scope}from'@sentry/hub'
2+
//import { Scope } from '@sentry/hub'
33
importenvironmentfrom'../../environment'
44

55
constonError=(error:Error)=>{
66
// set user scope https://docs.sentry.io/enriching-error-data/scopes/?platform=node
7-
sentry.withScope((scope:Scope)=>{
7+
sentry.withScope((scope:any)=>{
88
scope.setTag('VERSION',environment.VERSION)
99
// if (user) {
1010
// scope.setUser({

‎src/services/testRunner/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import node from '../../services/node'
33
importloggerfrom'../../services/logger'
44
importparserfrom'./parser'
55
import{debounce,throttle}from'./throttle'
6-
importonErrorfrom'services/sentry/onError'
6+
importonErrorfrom'../sentry/onError'
77

88
exportinterfacePayload{
99
stepId:string

‎src/webview/render.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import{JSDOM}from'jsdom'
22
import*aspathfrom'path'
33
import*asvscodefrom'vscode'
4-
importonErrorfrom'services/sentry/onError'
4+
importonErrorfrom'../services/sentry/onError'
55

66
constgetNonce=():string=>{
77
lettext=''
@@ -29,11 +29,14 @@ async function render(panel: vscode.WebviewPanel, rootPath: string) {
2929

3030
// generate vscode-resource build path uri
3131
constcreateUri=(filePath:string):any=>{
32-
returnpanel.webview
33-
.asWebviewUri(vscode.Uri.file(filePath))
34-
.toString()
35-
.replace(/^\/+/g,'')// remove leading '/'
36-
.replace('/vscode-resource%3A',rootPath)// replace mangled resource path with root
32+
return(
33+
panel.webview
34+
//@ts-ignore
35+
.asWebviewUri(vscode.Uri.file(filePath))
36+
.toString()
37+
.replace(/^\/+/g,'')// remove leading '/'
38+
.replace('/vscode-resource%3A',rootPath)
39+
)// replace mangled resource path with root
3740
}
3841

3942
// fix paths for scripts
@@ -70,9 +73,12 @@ async function render(panel: vscode.WebviewPanel, rootPath: string) {
7073
[
7174
`default-src 'self'`,
7275
`connect-src https: http:`,
76+
//@ts-ignore
7377
`font-src${panel.webview.cspSource} http: https: data:`,
78+
//@ts-ignore
7479
`img-src${panel.webview.cspSource} https:`,
7580
`script-src${nonces.map(nonce=>`'nonce-${nonce}'`).join(' ')} data:`,
81+
//@ts-ignore
7682
`style-src${panel.webview.cspSource} https: 'self' 'unsafe-inline'`,
7783
].join('; ')+';'
7884
document.head.appendChild(cspMeta)

‎web-app/src/components/Error/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { ApolloError } from 'apollo-boost'
22
import{GraphQLError}from'graphql'
33
import*asReactfrom'react'
44
import{css,jsx}from'@emotion/core'
5-
importonErrorfrom'services/sentry/onError'
5+
importonErrorfrom'../../services/sentry/onError'
66

77
conststyles={
88
container:{

‎web-app/src/components/Router/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import machine from '../../services/state/machine'
66
import{useMachine}from'../../services/xstate-react'
77
importdebuggerWrapperfrom'../Debugger/debuggerWrapper'
88
importRoutefrom'./Route'
9-
importonErrorfrom'services/sentry/onError'
9+
importonErrorfrom'../../services/sentry/onError'
1010

1111
interfaceProps{
1212
children:any

‎web-app/src/services/selectors/tutorial.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import{createSelector}from'reselect'
22
import{MachineContext}from'typings'
33
import*asGfrom'typings/graphql'
4-
importonErrorfrom'services/sentry/onError'
4+
importonErrorfrom'../../services/sentry/onError'
55

66
exportconstcurrentTutorial=({ tutorial}:MachineContext):G.Tutorial=>{
77
if(!tutorial){

‎web-app/src/services/sentry/onError.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import*assentryfrom'@sentry/node'
2-
import{Scope}from'@sentry/hub'
1+
import*assentryfrom'@sentry/browser'
2+
//import { Scope } from '@sentry/hub'
33
import{VERSION}from'../../environment'
44

55
constonError=(error:Error)=>{
66
// set user scope https://docs.sentry.io/enriching-error-data/scopes/?platform=node
7-
sentry.withScope((scope:Scope)=>{
7+
sentry.withScope((scope:any)=>{
88
scope.setTag('VERSION',VERSION)
99
// if (user) {
1010
// scope.setUser({

‎web-app/src/services/state/actions/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import client from '../../apollo'
44
import{setAuthToken}from'../../apollo/auth'
55
importauthenticateMutationfrom'../../apollo/mutations/authenticate'
66
importchannelfrom'../../channel'
7-
importonErrorfrom'services/sentry/onError'
7+
importonErrorfrom'../../../services/sentry/onError'
88

99
interfaceAuthenticateData{
1010
editorLogin:{

‎web-app/src/services/state/actions/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as CR from 'typings'
22
import*asGfrom'typings/graphql'
33
import{assign,send}from'xstate'
44
import*asselectorsfrom'../../selectors'
5-
importonErrorfrom'services/sentry/onError'
5+
importonErrorfrom'../../../services/sentry/onError'
66

77
exportdefault{
88
setEnv:assign({

‎web-app/src/services/state/actions/editor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import client from '../../apollo'
44
importtutorialQueryfrom'../../apollo/queries/tutorial'
55
importchannelfrom'../../channel'
66
import*asselectorsfrom'../../selectors'
7-
importonErrorfrom'services/sentry/onError'
7+
importonErrorfrom'../../../services/sentry/onError'
88

99
interfaceTutorialData{
1010
tutorial:G.Tutorial

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp