Skip to content

Commit 39e0000

Browse files
committed
add npm publish
1 parent 8d86adc commit 39e0000

3 files changed

Lines changed: 33 additions & 4 deletions

File tree

lib/client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class GetTestMailClient {
3131
async waitForMessage(id: string): Promise<WaitForMessageResponse> {
3232
const response = await fetch(`${this.baseUrl}/gettestmail/${id}`, {
3333
method: 'GET',
34+
redirect: 'follow',
3435
headers: {
3536
'Content-Type': 'application/json',
3637
'X-API-Key': this.apiKey,

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
2-
"name": "typescript-sdk",
2+
"name": "@gettestmail/typescript-sdk",
33
"version": "1.0.0",
44
"description": "Typescript SDK for GetTestMail",
5-
"main": "index.js",
5+
"main": "dist/index.js",
6+
"types": "dist/client.d.ts",
67
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8+
"clean": "rm -rf dist/*",
9+
"build": "tsc"
810
},
911
"repository": {
1012
"type": "git",
@@ -25,4 +27,4 @@
2527
"devDependencies": {
2628
"typescript": "5.0.4"
2729
}
28-
}
30+
}

tsconfig.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "dist/",
4+
"target": "ES2015",
5+
"module": "ESNext",
6+
"moduleResolution": "node",
7+
"esModuleInterop": true,
8+
"strict": true,
9+
"strictNullChecks": true,
10+
"forceConsistentCasingInFileNames": true,
11+
"declaration": true,
12+
"lib": [
13+
"esnext",
14+
"dom"
15+
]
16+
},
17+
"include": [
18+
"lib/**/*"
19+
],
20+
"exclude": [
21+
"node_modules",
22+
"**/__tests__/*",
23+
"**/*.test.*",
24+
"**/*.spec.*"
25+
]
26+
}

0 commit comments

Comments
 (0)