sentry-testkit 4.0.2 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,11 +26,15 @@ var createLocalServerApi = function createLocalServerApi(testkit) {
26
26
  var _parseDsn = parseDsn(userDsn),
27
27
  project = _parseDsn.project;
28
28
 
29
- var app = express(); // the performance endpoint uses a custom non-json payload so
29
+ var app = express();
30
+ app.use(function (req, res, next) {
31
+ res.header('Access-Control-Allow-Origin', '*');
32
+ next();
33
+ }); // the performance endpoint uses a custom non-json payload so
30
34
  // we can't use bodyParser.json() directly
31
35
 
32
36
  app.use(bodyParser.text({
33
- type: ['application/json', 'application/x-sentry-envelope']
37
+ type: ['application/json', 'application/x-sentry-envelope', 'text/plain']
34
38
  }));
35
39
  app.post("/api/".concat(project, "/store/"), function (req, res) {
36
40
  testkit.reports().push(transformReport(JSON.parse(req.body)));
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import {
9
9
 
10
10
  export = sentryTestkit
11
11
 
12
- declare function sentryTestkit(): sentryTestkit.TestkitResult
12
+ declare function sentryTestkit<T extends sentryTestkit.V6TransportClass | sentryTestkit.V7TransportFunction>(): sentryTestkit.TestkitResult<T>
13
13
 
14
14
  declare namespace sentryTestkit {
15
15
  interface Page {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sentry-testkit",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
4
4
  "description": "Sentry Testkit enables Sentry to work natively in your application while running tests. The report is not really sent but rather logged locally into memory. In this way, the logged reports can be fetched for your own verification or any other purpose in your local development environment.",
5
5
  "main": "dist/index.js",
6
6
  "types": "index.d.ts",