Adding protocol buffers to the project with Typescript support
This commit is contained in:
parent
1ccbea30e4
commit
2e8fa8d676
@ -10,7 +10,8 @@
|
||||
"profile": "tsc && node --prof ./dist/server.js",
|
||||
"test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json",
|
||||
"lint": "node_modules/.bin/eslint src/ . --ext .ts",
|
||||
"fix": "node_modules/.bin/eslint --fix src/ . --ext .ts"
|
||||
"fix": "node_modules/.bin/eslint --fix src/ . --ext .ts",
|
||||
"proto": "protoc --plugin=\"protoc-gen-ts=./node_modules/.bin/protoc-gen-ts\" --js_out=\"import_style=commonjs,binary:src/proto/generated\" --ts_out=\"src/proto/generated\" src/proto/messages.proto"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -44,6 +45,7 @@
|
||||
"body-parser": "^1.19.0",
|
||||
"express": "^4.17.1",
|
||||
"generic-type-guard": "^3.2.0",
|
||||
"google-protobuf": "^3.13.0",
|
||||
"http-status-codes": "^1.4.0",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"prom-client": "^12.0.0",
|
||||
@ -58,6 +60,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^2.26.0",
|
||||
"@typescript-eslint/parser": "^2.26.0",
|
||||
"eslint": "^6.8.0",
|
||||
"jasmine": "^3.5.0"
|
||||
"jasmine": "^3.5.0",
|
||||
"ts-protoc-gen": "^0.13.0"
|
||||
}
|
||||
}
|
||||
|
0
back/src/proto/generated/.gitkeep
Normal file
0
back/src/proto/generated/.gitkeep
Normal file
6
back/src/proto/messages.proto
Normal file
6
back/src/proto/messages.proto
Normal file
@ -0,0 +1,6 @@
|
||||
syntax = "proto3";
|
||||
|
||||
message SetPlayerDetailsMessage {
|
||||
string name = 1;
|
||||
repeated string characterLayers = 2;
|
||||
}
|
@ -822,6 +822,11 @@ globals@^12.1.0:
|
||||
dependencies:
|
||||
type-fest "^0.8.1"
|
||||
|
||||
google-protobuf@^3.13.0, google-protobuf@^3.6.1:
|
||||
version "3.13.0"
|
||||
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.13.0.tgz#909c5983d75dd6101ed57c79e0528d000cdc3251"
|
||||
integrity sha512-ZIf3qfLFayVrPvAjeKKxO5FRF1/NwRxt6Dko+fWEMuHwHbZx8/fcaAao9b0wCM6kr8qeg2te8XTpyuvKuD9aKw==
|
||||
|
||||
graceful-fs@^4.1.2:
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
|
||||
@ -1764,6 +1769,13 @@ ts-node@*:
|
||||
source-map-support "^0.5.6"
|
||||
yn "3.1.1"
|
||||
|
||||
ts-protoc-gen@^0.13.0:
|
||||
version "0.13.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-protoc-gen/-/ts-protoc-gen-0.13.0.tgz#2763ae4e4a1a7d7001d53d2f3043357c691701ea"
|
||||
integrity sha512-j18X4rkDBbG/ZHUJy88WFeZP6mStGow5uREaohowlHXTu3/N7WcpyPhb7Vh6wN38ERmc/AkT9gqT98+vtlRhJA==
|
||||
dependencies:
|
||||
google-protobuf "^3.6.1"
|
||||
|
||||
tsconfig@^7.0.0:
|
||||
version "7.0.0"
|
||||
resolved "https://registry.yarnpkg.com/tsconfig/-/tsconfig-7.0.0.tgz#84538875a4dc216e5c4a5432b3a4dec3d54e91b7"
|
||||
|
@ -66,7 +66,7 @@ services:
|
||||
- "traefik.http.routers.maps-ssl.service=maps"
|
||||
|
||||
back:
|
||||
image: thecodingmachine/nodejs:12
|
||||
image: thecodingmachine/workadventure-back-base:latest
|
||||
command: yarn dev
|
||||
#command: yarn run profile
|
||||
environment:
|
||||
|
Loading…
Reference in New Issue
Block a user