@ts-rest/core
Advanced tools
Comparing version 3.16.0 to 3.16.1
16
index.js
@@ -100,13 +100,9 @@ const isAppRoute = (obj) => { | ||
} | ||
switch (contentType) { | ||
case 'application/json': { | ||
return { status: result.status, body: await result.json() }; | ||
} | ||
case 'text/plain': { | ||
return { status: result.status, body: await result.text() }; | ||
} | ||
default: { | ||
return { status: result.status, body: await result.blob() }; | ||
} | ||
if (contentType.includes('application/json')) { | ||
return { status: result.status, body: await result.json() }; | ||
} | ||
if (contentType.includes('text/plain')) { | ||
return { status: result.status, body: await result.text() }; | ||
} | ||
return { status: result.status, body: await result.blob() }; | ||
}; | ||
@@ -113,0 +109,0 @@ const createFormData = (body) => { |
{ | ||
"name": "@ts-rest/core", | ||
"version": "3.16.0", | ||
"version": "3.16.1", | ||
"description": "RPC-like experience over a regular REST API, with type safe server implementations 🪄", | ||
@@ -24,9 +24,6 @@ "license": "MIT", | ||
"optional": true | ||
}, | ||
"tslib": { | ||
"optional": true | ||
} | ||
}, | ||
"peerDependencies": { | ||
"zod": "3.x.x" | ||
"zod": "^3.0.0" | ||
}, | ||
@@ -40,3 +37,10 @@ "typedoc": { | ||
"type": "module", | ||
"types": "./src/index.d.ts" | ||
"types": "./src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./src/index.d.ts", | ||
"import": "./index.js", | ||
"require": "./index.cjs" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
35991
771