Skip to content

Commit 94cf092

Browse files
committed
added new env types for sdk
1 parent e4809d1 commit 94cf092

5 files changed

Lines changed: 6 additions & 12 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "traceo-sdk",
3-
"version": "0.0.76-alpha",
3+
"version": "0.0.78-alpha",
44
"license": "MIT",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/index.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
import { Middleware, catchException } from "./node/middlewares";
22
import * as Traceo from "./node/sdk";
33

4-
export {
5-
Middleware,
6-
Traceo,
7-
catchException,
8-
};
4+
export { Middleware, Traceo, catchException };

src/node/middlewares.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import { isClientConnected, isLocalhost } from "../core/is";
33
import { TraceoError } from "../transport/base";
44
import { TraceoEvent } from "../transport/events";
55
import { TraceoIncomingMessage, TraceoServerResponse } from "../transport/http";
6-
import {
7-
ErrorMiddlewareOptions,
8-
} from "../transport/options";
6+
import { ErrorMiddlewareOptions } from "../transport/options";
97
import { getIp, getProtocol } from "./helpers";
108
import { prepareException } from "./parse";
119

@@ -116,7 +114,7 @@ export const catchException = async (error: any, catchOptions?: Catch) => {
116114

117115
const handleException = async (
118116
error: TraceoError,
119-
req?: TraceoIncomingMessage,
117+
req?: TraceoIncomingMessage
120118
) => {
121119
try {
122120
const event: TraceoEvent = await prepareException(error, req);

src/transport/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Environment } from "./types";
22

33
export interface TraceoOptions {
44
version?: string;
5-
environment?: Environment;
5+
environment: Environment;
66
dsn: string;
77
}
88

src/transport/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export type RequestMethodType = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
22

3-
export type Environment = "prod" | "dev";
3+
export type Environment = "production" | "development" | "test";

0 commit comments

Comments
 (0)