@arrirpc/server 0.60.3 → 0.61.0

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 +12 -1
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -197,11 +197,22 @@ app.rpc('sayHello',
197
197
 
198
198
  // defining a service
199
199
  const app = new ArriApp();
200
+ const usersService = defineService("users");
201
+ usersService.rpc("getUser", defineRpc({...}));
202
+ usersService.rpc("createUser", defineRpc({...}));
203
+
204
+ // register the service on the app instance
205
+ app.use(usersService);
206
+ ```
207
+
208
+ There's also a shorthand for initializing services with procedures
209
+
210
+ ```ts
211
+ // this is equivalent to what we showed above
200
212
  const usersService = defineService("users", {
201
213
  getUser: defineRpc({..}),
202
214
  createUser: defineRpc({..}),
203
215
  });
204
- app.use(usersService);
205
216
  ```
206
217
 
207
218
  #### Creating Event Stream Procedures
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/server",
3
- "version": "0.60.3",
3
+ "version": "0.61.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -28,14 +28,14 @@
28
28
  "scule": "^1.3.0",
29
29
  "source-map-support": "^0.5.21",
30
30
  "uncrypto": "^0.1.3",
31
- "@arrirpc/codegen-dart": "0.60.3",
32
- "@arrirpc/codegen-kotlin": "0.60.3",
33
- "@arrirpc/codegen-ts": "0.60.3",
34
- "@arrirpc/codegen-utils": "0.60.3",
35
- "@arrirpc/schema": "0.60.3",
36
- "arri": "0.60.3"
31
+ "@arrirpc/codegen-dart": "0.61.0",
32
+ "@arrirpc/codegen-ts": "0.61.0",
33
+ "@arrirpc/codegen-kotlin": "0.61.0",
34
+ "@arrirpc/schema": "0.61.0",
35
+ "@arrirpc/codegen-utils": "0.61.0",
36
+ "arri": "0.61.0"
37
37
  },
38
38
  "devDependencies": {
39
- "bun-types": "^1.1.24"
39
+ "bun-types": "^1.1.25"
40
40
  }
41
41
  }