Skip to content

Commit 40afcbf

Browse files
committed
[public-api] Use buf for codegen
1 parent 9aa6120 commit 40afcbf

25 files changed

+2371
-10161
lines changed

components/public-api/buf.gen.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,12 @@ plugins:
88
out: go
99
opt:
1010
- module=github.com/gitpod-io/gitpod/public-api
11+
12+
- name: es
13+
out: typescript/src
14+
opt: target=ts
15+
path: typescript/node_modules/.bin/protoc-gen-es
16+
- name: connect-web
17+
out: typescript/src
18+
opt: target=ts
19+
path: typescript/node_modules/.bin/protoc-gen-connect-web

components/public-api/generate.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/bin/bash
22

3-
4-
53
if [ -n "$DEBUG" ]; then
64
set -x
75
fi
@@ -11,18 +9,15 @@ set -o nounset
119
set -o pipefail
1210

1311
ROOT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)/../../
14-
COMPONENTS_DIR="$ROOT_DIR"/components
1512

1613
# include protoc bash functions
1714
# shellcheck disable=SC1090,SC1091
1815
source "$ROOT_DIR"/scripts/protoc-generator.sh
1916

20-
lint
21-
2217
install_dependencies
2318

24-
protoc_buf_generate
19+
lint
2520

26-
typescript_protoc "$COMPONENTS_DIR" "gitpod/v1"
21+
protoc_buf_generate
2722

2823
update_license

components/public-api/go/v1/pagination.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/public-api/go/v1/prebuilds.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/public-api/go/v1/workspaces.pb.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/public-api/tools.go

Lines changed: 0 additions & 6 deletions
This file was deleted.

components/public-api/typescript/package.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,16 @@
1212
"test:brk": "yarn test --inspect-brk"
1313
},
1414
"dependencies": {
15-
"@gitpod/gitpod-protocol": "0.1.5",
16-
"@grpc/grpc-js": "^1.3.7",
17-
"google-protobuf": "^3.19.1",
18-
"opentracing": "^0.14.4"
15+
"@bufbuild/connect-web": "^0.2.1",
16+
"@bufbuild/protobuf": "^0.1.1",
17+
"@bufbuild/protoc-gen-connect-web": "^0.2.1",
18+
"@bufbuild/protoc-gen-es": "^0.1.1",
19+
"@gitpod/gitpod-protocol": "0.1.5"
1920
},
2021
"devDependencies": {
2122
"@testdeck/mocha": "0.1.2",
2223
"@types/chai": "^4.1.2",
23-
"@types/google-protobuf": "^3.15.5",
2424
"@types/node": "^16.11.0",
25-
"grpc-tools": "^1.11.2",
26-
"grpc_tools_node_protoc_ts": "^5.3.2",
27-
"typescript": "~4.4.2",
28-
"typescript-formatter": "^7.2.2"
25+
"typescript": "~4.4.2"
2926
}
3027
}

components/public-api/typescript/src/gitpod/v1/pagination_grpc_pb.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

components/public-api/typescript/src/gitpod/v1/pagination_pb.d.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

components/public-api/typescript/src/gitpod/v1/pagination_pb.js

Lines changed: 0 additions & 206 deletions
This file was deleted.

0 commit comments

Comments
 (0)