Skip to content

Commit 9e2796b

Browse files
author
Steven Weingärtner
committed
feat(plugin-sentry): add basic typescript types for module
1 parent beff2f4 commit 9e2796b

4 files changed

Lines changed: 32 additions & 0 deletions

File tree

packages/plugin-sentry/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@tspm:registry=https://gitlab.brainbits.net/api/v4/projects/361/packages/npm/
2+
//gitlab.brainbits.net/api/v4/projects/361/packages/npm/:_authToken=${NPM_TOKEN}

packages/plugin-sentry/package-lock.json

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

packages/plugin-sentry/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "2.2.3",
44
"description": "Logger plugin sentry",
55
"main": "dist/index.js",
6+
"types": "src/types.d.ts",
67
"scripts": {
78
"build:watch": "npm run build -- --watch --source-maps",
89
"build": "babel src --out-dir ./dist --ignore test.js,setupTests.js,__mocks__/*",
@@ -66,6 +67,7 @@
6667
"@babel/eslint-parser": "^7.14.7",
6768
"@babel/plugin-proposal-class-properties": "^7.14.5",
6869
"@babel/preset-env": "^7.14.8",
70+
"@tspm/node-logger": "^2.2.3",
6971
"eslint": "^7.31.0",
7072
"eslint-config-brainbits": "^3.0.8",
7173
"eslint-config-brainbits-jest": "^3.0.8",
@@ -74,5 +76,8 @@
7476
"eslint-plugin-jest": "^24.4.0",
7577
"eslint-plugin-promise": "^5.1.0",
7678
"jest": "^27.0.6"
79+
},
80+
"peerDependencies": {
81+
"@tspm/node-logger": "^2.2.3"
7782
}
7883
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
declare module '@tspm/node-logger' {
2+
interface Config {
3+
sentry?: {
4+
debug?: boolean;
5+
dsn?: string;
6+
environment?: string;
7+
release?: string;
8+
maxBreadcrumbs?: number;
9+
exceptionLevel?: LogLevel;
10+
breadcrumbLevelMap?: {
11+
[key in LogLevel]?: 'error' | 'warning' | 'info' | 'debug';
12+
};
13+
tags?: Record<string, string>;
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)