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.23.0-beta.0 to 3.23.0

5

CHANGELOG.md
# @ts-rest/express
## 3.23.0-beta.0
## 3.23.0
### Minor Changes
- b84b0df: Add middleware directly through ts-rest with type-safe injected route object
- 74bb4a8: Implement strict mode at a contract level. Strict mode ensures that only known responses are allowed by the type system. This applies both on the server and client side. Enable this with `strictStatusCodes: true` when defining a contract. If you would like to have the vanilla client throw an error when the response status is not known then you will need to use `throwOnUnknownStatus` when initializing the client.
- 74e41dc: Add middleware directly through ts-rest with type-safe injected route object

@@ -9,0 +10,0 @@ ## 3.22.0

@@ -7,10 +7,2 @@ 'use strict';

function getValue(data, path, defaultValue) {
const value = path
.split(/[.[\]]/)
.filter(Boolean)
.reduce((value, key) => value === null || value === void 0 ? void 0 : value[key], data);
return value !== undefined ? value : defaultValue;
}
const isAppRouteImplementation = (obj) => {

@@ -205,3 +197,2 @@ return typeof obj === 'function';

exports.createExpressEndpoints = createExpressEndpoints;
exports.getValue = getValue;
exports.initServer = initServer;

4

package.json
{
"name": "@ts-rest/express",
"version": "3.23.0-beta.0",
"version": "3.23.0",
"peerDependencies": {
"express": "^4.0.0",
"zod": "^3.0.0",
"@ts-rest/core": "3.23.0-beta.0"
"@ts-rest/core": "3.23.0"
},

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

@@ -56,2 +56,5 @@ # ts-rest

},
headers: z.object({
'x-pagination-page': z.coerce.number().optional(),
}),
},

@@ -78,2 +81,3 @@ });

const result = await client.getPosts({
headers: { 'x-pagination-page': 1 },
query: { skip: 0, take: 10 },

@@ -100,4 +104,4 @@ // ^-- Fully typed!

<div align="center" style={{margin: "50px"}}>
<h2>๐Ÿ‘‰ Read more on the official <a href="https://ts-rest.com/docs/quickstart?utm_source=github&utm_medium=documentation&utm_campaign=readme">Quickstart Guide</a>๐Ÿ‘ˆ</h2>
<div align="center">
<h3>๐Ÿ‘‰ Read more on the official <a href="https://ts-rest.com/docs/quickstart?utm_source=github&utm_medium=documentation&utm_campaign=readme">Quickstart Guide</a> ๐Ÿ‘ˆ</h3>
</div>

@@ -125,2 +129,3 @@

<td align="center" valign="top" width="14.28%"><a href="http://rifaldhiaw.com"><img src="https://avatars.githubusercontent.com/u/7936061?v=4?s=100" width="100px;" alt="Rifaldhi AW"/><br /><sub><b>Rifaldhi AW</b></sub></a><br /><a href="https://github.com/ts-rest/ts-rest/commits?author=rifaldhiaw" title="Documentation">๐Ÿ“–</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Jwcode-uk"><img src="https://avatars.githubusercontent.com/u/30149596?v=4?s=100" width="100px;" alt="Jonathan White "/><br /><sub><b>Jonathan White </b></sub></a><br /><a href="https://github.com/ts-rest/ts-rest/commits?author=Jwcode-uk" title="Code">๐Ÿ’ป</a> <a href="https://github.com/ts-rest/ts-rest/commits?author=Jwcode-uk" title="Documentation">๐Ÿ“–</a></td>
</tr>

@@ -127,0 +132,0 @@ </tbody>

@@ -1,4 +0,3 @@

export * from './lib/get-value';
export * from './lib/ts-rest-express';
export { TsRestRequest, TsRestRequestHandler } from './lib/types';
export { RequestValidationError } from './lib/request-validation-error';

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