Skip to content

Commit 109f21f

Browse files
committed
added sentry sourcemaps
1 parent 5266741 commit 109f21f

File tree

4 files changed

+190
-10
lines changed

4 files changed

+190
-10
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@ lerna-debug.log*
4343

4444
# database volume
4545
db-volume
46+
47+
# Sentry Config File
48+
.sentryclirc

package-lock.json

Lines changed: 175 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"private": true,
77
"license": "UNLICENSED",
88
"scripts": {
9-
"build": "npm run redoc:build && nest build",
9+
"build": "npm run redoc:build && nest build && npm run sentry:sourcemaps",
1010
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"db/**/*.ts\"",
1111
"start": "nest start",
1212
"dev": "nest start --watch",
@@ -26,7 +26,8 @@
2626
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
2727
"test:e2e": "jest --config ./test/jest-e2e.json",
2828
"prepare": "husky install",
29-
"generate": "kubb generate"
29+
"generate": "kubb generate",
30+
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org nyc-planning --project zoning-api ./dist && sentry-cli sourcemaps upload --org nyc-planning --project zoning-api ./dist"
3031
},
3132
"dependencies": {
3233
"@nestjs/common": "^10.3.3",
@@ -35,6 +36,7 @@
3536
"@nestjs/platform-express": "^10.0.0",
3637
"@nestjs/serve-static": "^4.0.0",
3738
"@ntegral/nestjs-sentry": "^4.0.1",
39+
"@sentry/cli": "^2.31.0",
3840
"@sentry/node": "^7.106.1",
3941
"drizzle-orm": "^0.29.0",
4042
"joi": "^17.11.0",
@@ -110,4 +112,4 @@
110112
"npm run lint"
111113
]
112114
}
113-
}
115+
}

tsconfig.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
"noImplicitAny": true,
1717
"strictBindCallApply": true,
1818
"forceConsistentCasingInFileNames": true,
19-
"noFallthroughCasesInSwitch": true
19+
"noFallthroughCasesInSwitch": true,
20+
"inlineSources": true,
21+
22+
// Set `sourceRoot` to "/" to strip the build path prefix
23+
// from generated source code references.
24+
// This improves issue grouping in Sentry.
25+
"sourceRoot": "/"
2026
}
2127
}

0 commit comments

Comments
 (0)