Skip to content

Commit 0794566

Browse files
committed
generate typescript interface from jsonschema
1 parent 052a822 commit 0794566

File tree

8 files changed

+537
-8
lines changed

8 files changed

+537
-8
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
*.js
33
*.js.map
4+
*.d.ts

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"typescript": "^5.3.3"
1212
},
1313
"scripts": {
14-
"build": "npm install --no-audit --no-fund && npm run build:client && npm run build:server",
14+
"build": "npm install --no-audit --no-fund && npm run build:shared && npm run build:client && npm run build:server",
15+
"build:shared": "cd src/shared && npm run build",
1516
"build:client": "cd src/client && npm run build",
1617
"build:server": "cd src/server && npm run build",
1718
"run": "cd src/server && npm run run"

src/server/server.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import jsonschema from "jsonschema";
55

66
import database from "./database.js";
77
import defaultRoomState from "./defaultRoom.js";
8-
import {protocolSchema} from "../shared/protocol.js";
8+
import { protocolSchema } from "../shared/schema.js";
99

1010
const bindIpAddress = "127.0.0.1";
1111

0 commit comments

Comments
 (0)