@emeryld/rrroutes-server 2.3.4 → 2.3.5

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 +6 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -30,22 +30,22 @@ import { z } from 'zod'
30
30
 
31
31
  // 1) Build & finalize contracts (usually elsewhere in your app)
32
32
  const leaves = resource('/api')
33
- .sub('profiles', (r) =>
34
- r
33
+ .sub(
34
+ resource('profiles')
35
35
  .get({
36
36
  outputSchema: z.array(
37
37
  z.object({ id: z.string().uuid(), name: z.string() }),
38
38
  ),
39
39
  description: 'List profiles',
40
40
  })
41
- .subId('profileId', z.string().uuid(), (p) =>
42
- p
41
+ .sub(
42
+ resource(':profileId', undefined, z.string().uuid())
43
43
  .patch({
44
44
  bodySchema: z.object({ name: z.string().min(1) }),
45
45
  outputSchema: z.object({ id: z.string().uuid(), name: z.string() }),
46
46
  })
47
- .sub('avatar', (a) =>
48
- a
47
+ .sub(
48
+ resource('avatar')
49
49
  .put({
50
50
  bodyFiles: [{ name: 'avatar', maxCount: 1 }], // derive upload middleware
51
51
  bodySchema: z.object({ avatar: z.instanceof(Blob) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emeryld/rrroutes-server",
3
- "version": "2.3.4",
3
+ "version": "2.3.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -17,7 +17,7 @@
17
17
  "dist"
18
18
  ],
19
19
  "dependencies": {
20
- "@emeryld/rrroutes-contract": "^2.4.13",
20
+ "@emeryld/rrroutes-contract": "^2.4.14",
21
21
  "jose": "^6.1.3",
22
22
  "socket.io": "^4.8.1",
23
23
  "zod": "^4.1.13"