feat: whyrating - initial project from turbostarter boilerplate
This commit is contained in:
3
packages/monitoring/shared/eslint.config.js
Normal file
3
packages/monitoring/shared/eslint.config.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import baseConfig from "@turbostarter/eslint-config/base";
|
||||
|
||||
export default baseConfig;
|
||||
24
packages/monitoring/shared/package.json
Normal file
24
packages/monitoring/shared/package.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "@turbostarter/monitoring",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./src/index.ts"
|
||||
},
|
||||
"scripts": {
|
||||
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
||||
"format": "prettier --check . --ignore-path ../../.gitignore",
|
||||
"lint": "eslint",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"prettier": "@turbostarter/prettier-config",
|
||||
"devDependencies": {
|
||||
"@turbostarter/eslint-config": "workspace:*",
|
||||
"@turbostarter/prettier-config": "workspace:*",
|
||||
"@turbostarter/tsconfig": "workspace:*",
|
||||
"eslint": "catalog:",
|
||||
"prettier": "catalog:",
|
||||
"typescript": "catalog:"
|
||||
}
|
||||
}
|
||||
1
packages/monitoring/shared/src/index.ts
Normal file
1
packages/monitoring/shared/src/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./types";
|
||||
21
packages/monitoring/shared/src/types.ts
Normal file
21
packages/monitoring/shared/src/types.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
export interface MonitoringProviderStrategy {
|
||||
/**
|
||||
* Capture an exception
|
||||
* @param error - The error to capture
|
||||
*/
|
||||
captureException<Extra extends Record<string, unknown>>(
|
||||
error: unknown,
|
||||
extra?: Extra,
|
||||
): void;
|
||||
|
||||
/**
|
||||
* Identify a user in the monitoring service - used for tracking user actions
|
||||
* @param info
|
||||
*/
|
||||
identify<Info extends { id: string }>(info: Info): unknown;
|
||||
|
||||
/**
|
||||
* Initialize the monitoring service
|
||||
*/
|
||||
initialize(): void | Promise<void>;
|
||||
}
|
||||
6
packages/monitoring/shared/tsconfig.json
Normal file
6
packages/monitoring/shared/tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "@turbostarter/tsconfig/internal.json",
|
||||
"compilerOptions": {},
|
||||
"include": ["*.ts", "src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
Reference in New Issue
Block a user