Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ts-rest/nest

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-rest/nest - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

6

CHANGELOG.md
# @ts-rest/nest
## 2.1.0
### Minor Changes
- 75f157a: Add Zod validation to @ts-rest/next
## 2.0.1

@@ -4,0 +10,0 @@

8

package.json
{
"name": "@ts-rest/nest",
"version": "2.0.1",
"version": "2.1.0",
"description": "Nest server integration for @ts-rest",

@@ -27,8 +27,8 @@ "type": "commonjs",

"peerDependencies": {
"@nestjs/common": "^9.0.8",
"@ts-rest/core": "2.0.1",
"@nestjs/common": "^9.0.11",
"@ts-rest/core": "2.1.0",
"zod": "^3.18.0",
"rxjs": "^7.0.0",
"@swc/helpers": "~0.4.3"
"@swc/helpers": "~0.4.11"
}
}

@@ -26,21 +26,2 @@ "use strict";

};
const getPathParams = (url, appRoute)=>{
const baseUrl = url.split('?')[0];
const paths = (0, _core.getAppRoutePathRoute)(appRoute);
const baseUrlAsArr = baseUrl.split('/');
const pathAsArr = paths.split('/');
const pathParams = {};
baseUrlAsArr.forEach((baseUrlPart, index)=>{
pathParams[pathAsArr[index]] = baseUrlPart;
});
// remove pathParams where key doesn't start with :
const pathParamsWithoutColons = Object.entries(pathParams).reduce((acc, [key, value])=>{
if (key.startsWith(':')) {
const keyWithoutColon = key.slice(1);
acc[keyWithoutColon] = value;
}
return acc;
}, {});
return pathParamsWithoutColons;
};
const isZodObject = (body)=>{

@@ -99,3 +80,3 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any

}
const pathParams = getPathParams(req.url, appRoute);
const pathParams = (0, _core.getPathParamsFromUrl)(req.url, appRoute);
const queryParams = getQueryParams(req.url);

@@ -102,0 +83,0 @@ const queryResult = checkQuerySchema(queryParams, appRoute);

Sorry, the diff of this file is not supported yet

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