minimonolith 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -126,8 +126,9 @@ This file validates the `get:id` method's input, ensuring that the provided `id`
126
126
  import { z, DB_VALIDATION } from 'minimonolith';
127
127
 
128
128
  export default (MODELS, ROUTE_CODE) => ({
129
- id: z.string().superRefine(
130
- DB_VALIDATION.exists(MODELS.todo, 'id', { parseInt: true })
131
- ),
129
+ id: z.string()
130
+ .superRefine(DB_VALIDATION.isSafeInt('id'))
131
+ .transform(id => parseInt(id))
132
+ .superRefine(DB_VALIDATION.exists(MODELS.todo, 'id')),
132
133
  })
133
134
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "minimonolith",
3
3
  "type": "module",
4
- "version": "0.13.0",
4
+ "version": "0.13.1",
5
5
  "main": "index.js",
6
6
  "license": "MIT",
7
7
  "scripts": {