@arrirpc/server 0.58.1 → 0.60.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.
- package/README.md +12 -10
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Typescript implementation of [Arri RPC](/README.md). It's built on top of [H3](https://github.com/unjs/h3) and uses [esbuild](https://esbuild.github.io/) for bundling.
|
|
4
4
|
|
|
5
|
+
Parameters and responses are defined using [@arrirpc/schema](/tooling/schema/README.md) for automatic validation and serialization of inputs and outputs and to generate Arri Type Definitions for client generators.
|
|
6
|
+
|
|
5
7
|
## Table of Contents
|
|
6
8
|
|
|
7
9
|
- [Quickstart](#quickstart)
|
|
@@ -45,10 +47,10 @@ pnpm run dev
|
|
|
45
47
|
|
|
46
48
|
```bash
|
|
47
49
|
# npm
|
|
48
|
-
npm install arri @
|
|
50
|
+
npm install arri @arrirpc/server @arrirpc/schema
|
|
49
51
|
|
|
50
52
|
# pnpm
|
|
51
|
-
pnpm install arri @
|
|
53
|
+
pnpm install arri @arrirpc/server @arrirpc/schema
|
|
52
54
|
```
|
|
53
55
|
|
|
54
56
|
### Scaffold Your Project
|
|
@@ -82,12 +84,10 @@ Create an `arri.config.ts` in the project directory
|
|
|
82
84
|
|
|
83
85
|
```ts
|
|
84
86
|
// arri.config.ts
|
|
85
|
-
import { defineConfig, generators } from "arri";
|
|
87
|
+
import { defineConfig, servers, generators } from "arri";
|
|
86
88
|
|
|
87
89
|
export default defineConfig({
|
|
88
|
-
|
|
89
|
-
port: 3000,
|
|
90
|
-
srcDir: "src",
|
|
90
|
+
server: servers.tsServer(),
|
|
91
91
|
generators: [
|
|
92
92
|
generators.typescriptClient({
|
|
93
93
|
// options
|
|
@@ -176,9 +176,11 @@ export default defineRpc({
|
|
|
176
176
|
|
|
177
177
|
```ts
|
|
178
178
|
export default defineConfig({
|
|
179
|
+
servers: servers.tsServer({
|
|
180
|
+
procedureDir: "procedures", // change which directory to look for procedures (This is relative to the srcDir)
|
|
181
|
+
procedureGlobPatterns: ["**/*.rpc.ts"], // change the file name glob pattern for finding rpcs
|
|
182
|
+
}),
|
|
179
183
|
// rest of config
|
|
180
|
-
procedureDir: "procedures", // change which directory to look for procedures (This is relative to the srcDir)
|
|
181
|
-
procedureGlobPatterns: ["**/*.rpc.ts"], // change the file name glob pattern for finding rpcs
|
|
182
184
|
});
|
|
183
185
|
```
|
|
184
186
|
|
|
@@ -438,10 +440,10 @@ declare module "@arrirpc/server" {
|
|
|
438
440
|
|
|
439
441
|
```ts
|
|
440
442
|
// arri.config.ts
|
|
441
|
-
import { defineConfig, generators } from "arri";
|
|
443
|
+
import { defineConfig, servers, generators } from "arri";
|
|
442
444
|
|
|
443
445
|
export default defineConfig({
|
|
444
|
-
|
|
446
|
+
server: servers.tsServer(),
|
|
445
447
|
generators: [
|
|
446
448
|
generators.typescriptClient({...}),
|
|
447
449
|
generators.dartClient({...}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arrirpc/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.1",
|
|
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/
|
|
33
|
-
"
|
|
34
|
-
"@arrirpc/
|
|
35
|
-
"
|
|
36
|
-
"@arrirpc/codegen-
|
|
31
|
+
"@arrirpc/codegen-dart": "0.60.1",
|
|
32
|
+
"@arrirpc/codegen-ts": "0.60.1",
|
|
33
|
+
"@arrirpc/codegen-kotlin": "0.60.1",
|
|
34
|
+
"@arrirpc/schema": "0.60.1",
|
|
35
|
+
"arri": "0.60.1",
|
|
36
|
+
"@arrirpc/codegen-utils": "0.60.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"bun-types": "^1.1.
|
|
39
|
+
"bun-types": "^1.1.24"
|
|
40
40
|
}
|
|
41
41
|
}
|