fix(core): initial

This commit is contained in:
2018-10-31 12:43:13 +01:00
commit 09a41f46d9
12 changed files with 1381 additions and 0 deletions

1
ts/index.ts Normal file
View File

@ -0,0 +1 @@
export * from './sentry.classes.sentry';

View File

@ -0,0 +1,25 @@
import * as plugins from './sentry.plugins';
/**
* the constructor options for Sentry
*/
export interface ISentryConstructorOptions {
appName: string;
dsn: string;
}
/**
* The main class that is used creating instances of sentry
*/
export class Sentry {
constructor(optionsArg: ISentryConstructorOptions) {
plugins.sentry.init({
dsn: optionsArg.dsn
});
}
captureException(exceptionArg: any) {
plugins.sentry.captureException(exceptionArg);
}
}

3
ts/sentry.plugins.ts Normal file
View File

@ -0,0 +1,3 @@
import * as sentry from '@sentry/node';
export { sentry };