New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ts-rest/express

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-rest/express - npm Package Compare versions

Comparing version 3.26.0-rc3.0 to 3.26.0

6

CHANGELOG.md
# @ts-rest/express
## 3.26.0-rc3.0
## 3.26.0
### Minor Changes
- fcf877d: Allow defining non-json response types in the contract
## 3.25.1

@@ -6,0 +10,0 @@

12

index.js

@@ -93,5 +93,7 @@ 'use strict';

const statusCode = Number(result.status);
const responseType = schema.responses[statusCode];
let validatedResponseBody = result.body;
if (options.responseValidation) {
const response = core.validateResponse({
responseType: schema.responses[statusCode],
responseType,
response: {

@@ -102,5 +104,9 @@ status: statusCode,

});
return res.status(statusCode).json(response.body);
validatedResponseBody = response.body;
}
return res.status(statusCode).json(result.body);
if (core.isAppRouteOtherResponse(responseType)) {
res.setHeader('content-type', responseType.contentType);
return res.status(statusCode).send(validatedResponseBody);
}
return res.status(statusCode).json(validatedResponseBody);
}

@@ -107,0 +113,0 @@ catch (e) {

{
"name": "@ts-rest/express",
"version": "3.26.0-rc3.0",
"version": "3.26.0",
"peerDependencies": {
"express": "^4.0.0",
"zod": "^3.0.0",
"@ts-rest/core": "3.26.0-rc3.0"
"@ts-rest/core": "3.26.0"
},

@@ -9,0 +9,0 @@ "peerDependenciesMeta": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc