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

@ts-rest/core

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-rest/core - npm Package Compare versions

Comparing version 3.49.4 to 3.50.0

6

CHANGELOG.md
# @ts-rest/core
## 3.50.0
### Minor Changes
- 83f6675: Do not require `body` to be defined for DELETE endpoints in contracts
## 3.49.4

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

5

index.cjs.js

@@ -396,3 +396,3 @@ 'use strict';

if (route.method !== 'GET') {
if (route.contentType === 'multipart/form-data') {
if ('contentType' in route && route.contentType === 'multipart/form-data') {
fetcherArgs = {

@@ -404,3 +404,4 @@ ...fetcherArgs,

}
else if (route.contentType === 'application/x-www-form-urlencoded') {
else if ('contentType' in route &&
route.contentType === 'application/x-www-form-urlencoded') {
fetcherArgs = {

@@ -407,0 +408,0 @@ ...fetcherArgs,

2

package.json
{
"name": "@ts-rest/core",
"version": "3.49.4",
"version": "3.50.0",
"private": false,

@@ -5,0 +5,0 @@ "description": "RPC-like experience over a regular REST API, with type safe server implementations 🪄",

@@ -54,2 +54,9 @@ import { Merge, Opaque, Prettify, WithoutUnknown } from './type-utils';

};
/**
* A mutation endpoint. In REST terms, one using POST, PUT,
* PATCH, or DELETE.
*/
export type AppRouteDeleteNoBody = AppRouteCommon & {
method: 'DELETE';
};
type ValidatedHeaders<T extends AppRoute, TOptions extends RouterOptions, TOptionsApplied = ApplyOptions<T, TOptions>> = 'headers' extends keyof TOptionsApplied ? TOptionsApplied['headers'] extends MixedZodError<infer A, infer B> ? {

@@ -82,3 +89,3 @@ _error: 'Cannot mix plain object types with Zod objects for headers';

*/
export type AppRoute = AppRouteQuery | AppRouteMutation;
export type AppRoute = AppRouteQuery | AppRouteMutation | AppRouteDeleteNoBody;
export type AppRouteStrictStatusCodes = Omit<AppRoute, 'strictStatusCodes'> & {

@@ -85,0 +92,0 @@ strictStatusCodes: true;

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