Skip to content

Commit c6cc76f

Browse files
committed
bump stacktrace-parser-node version, index.ts moved to project root
1 parent a127c2f commit c6cc76f

5 files changed

Lines changed: 8 additions & 14 deletions

File tree

index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { Middleware, catchException } from "./src/node/middlewares";
2+
import * as Traceo from "./src/node/sdk";
3+
4+
export { Middleware, Traceo, catchException };

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "traceo-sdk",
3-
"version": "0.0.84",
3+
"version": "0.0.85",
44
"license": "MIT",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -29,6 +29,7 @@
2929
"prettier-check": "^2.0.0",
3030
"rimraf": "^3.0.2",
3131
"rollup": "^2.66.1",
32+
"stacktrace-parser-node": "1.1.0",
3233
"ts-node": "^10.4.0",
3334
"tslib": "^2.3.1",
3435
"tslint": "^5.11.0",
@@ -48,8 +49,5 @@
4849
"testMatch": [
4950
"**/*.test.ts"
5051
]
51-
},
52-
"dependencies": {
53-
"stacktrace-parser-node": "^1.0.4"
5452
}
5553
}

src/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/node/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Middleware } from "..";
1+
import { Middleware } from "../..";
22
import * as Traceo from "./sdk";
33

44
export { Middleware, Traceo };

src/node/middlewares.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { TraceoEvent } from "../transport/events";
66
import { TraceoIncomingMessage, TraceoServerResponse } from "../transport/http";
77
import { ErrorMiddlewareOptions } from "../transport/options";
88
import { getIp, getOsPlatform, getProtocol } from "./helpers";
9-
109
/**
1110
* Base middleware to catch and intercept error across the express app.
1211
* This middleware catch errors only from the no-async methods.
@@ -121,10 +120,7 @@ const handleException = async (error: TraceoError) => {
121120
}
122121
};
123122

124-
125-
const prepareException = async (
126-
error: TraceoError
127-
): Promise<TraceoEvent> => {
123+
const prepareException = async (error: TraceoError): Promise<TraceoEvent> => {
128124
const { stack } = error;
129125
const platform = getOsPlatform();
130126

0 commit comments

Comments
 (0)