@arrirpc/server 0.60.2 → 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.
- package/README.md +12 -1
- 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.
|
|
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-
|
|
32
|
-
"@arrirpc/codegen-
|
|
33
|
-
"@arrirpc/codegen-
|
|
34
|
-
"@arrirpc/schema": "0.
|
|
35
|
-
"@arrirpc/codegen-
|
|
36
|
-
"arri": "0.
|
|
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.
|
|
39
|
+
"bun-types": "^1.1.25"
|
|
40
40
|
}
|
|
41
41
|
}
|