Skip to content

Commit

Permalink
feat(medusa-plugin-sentry): Add service unit tests and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien2p committed Oct 12, 2022
1 parent 204cc69 commit 05b3e94
Show file tree
Hide file tree
Showing 6 changed files with 1,679 additions and 47 deletions.
12 changes: 6 additions & 6 deletions packages/medusa-plugin-sentry/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ And here are the plugin configuration types
export type SentryWebHookOptions = {
path: string;
secret: string;
emitOnIssue?: boolean | ((req) => Promise<void>);
emitOnError?: boolean | ((req) => Promise<void>);
emitOnComment?: boolean | ((req) => Promise<void>);
emitOnEventOrMetricAlert?: boolean | ((req) => Promise<void>);
emitOnInstallOrDeleted?: boolean | ((req) => Promise<void>);
}
emitOnIssue?: boolean | ((container: unknown, data: SentryWebHookData) => Promise<void>);
emitOnError?: boolean | ((container: unknown, data: SentryWebHookData) => Promise<void>);
emitOnComment?: boolean | ((container: unknown, data: SentryWebHookData) => Promise<void>);
emitOnEventOrMetricAlert?: boolean | ((container: unknown, data: SentryWebHookData) => Promise<void>);
emitOnInstallOrDeleted?: boolean | ((container: unknown, data: SentryWebHookData) => Promise<void>);
};

export type SentryOptions = Omit<NodeOptions, 'integrations'> & {
integrations: Integration[] | ((router: Router, sentry: typeof Sentry, tracing: typeof Tracing) => Integration[]);
Expand Down
17 changes: 13 additions & 4 deletions packages/medusa-plugin-sentry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,36 @@
"scripts": {
"build": "run-s clean build:tsc",
"build:tsc": "tsc -b",
"clean": "rimraf api handlers utils types coverage tsconfig.tsbuildinfo"
"clean": "rimraf api handlers utils types coverage tsconfig.tsbuildinfo",
"test": "jest"
},
"peerDependencies": {
"@medusajs/medusa": "^1.4.1",
"medusa-core-utils": "^1.1.31",
"medusa-interfaces": "^1.3.3",
"typeorm": "^0.2.45"
},
"devDependencies": {
"@medusajs/medusa": "^1.4.1",
"@types/express": "^4.17.14",
"@types/jest": "^29.1.2",
"jest": "^29.1.2",
"medusa-core-utils": "^1.1.31",
"medusa-interfaces": "^1.3.3",
"medusa-test-utils": "^1.1.37",
"ts-jest": "^29.0.3",
"ts-node": "^8.6.2",
"typeorm": "^0.2.45"
},
"dependencies": {
"@sentry/node": "^7.14.1",
"@sentry/tracing": "^7.14.1",
"@types/express": "^4.17.14",
"axios": "^1.0.0",
"class-validator": "^0.13.2",
"cors": "^2.8.5",
"express": "^4.18.1",
"medusa-core-utils": "^1.1.31"
"express": "^4.18.1"
},
"jest": {
"preset": "ts-jest"
}
}
Loading

0 comments on commit 05b3e94

Please sign in to comment.