Skip to content

Commit

Permalink
feat(messenger): weshnet daemon (#609)
Browse files Browse the repository at this point in the history
* chore: add weshnet client codegen

Signed-off-by: Norman Meier <norman@berty.tech>

* feat: weshnet example

Signed-off-by: Norman Meier <norman@berty.tech>

* chore: move weshd and weshnet codegen into this repo

Signed-off-by: Norman Meier <norman@berty.tech>

* fix(wesh): contact request

Signed-off-by: Norman Meier <norman@berty.tech>

* feat: upgrade weshnet

* feat: remove test chat screen

* chore: add /packages/weshnet on eslintignore

* chore: split weshnet package

Signed-off-by: Norman Meier <norman@berty.tech>

* chore: upgrade weshnet

Signed-off-by: Norman Meier <norman@berty.tech>

* feat: add test button

Signed-off-by: Norman Meier <norman@berty.tech>

* feat: use standard grpc-web instead of improbable-eng

Signed-off-by: Norman Meier <norman@berty.tech>

* chore: force go version 1.19 on CI due to quic-go

Signed-off-by: Norman Meier <norman@berty.tech>

* chore: upgrade buf to 1.28

Signed-off-by: Norman Meier <norman@berty.tech>

* chore: upgrade node version in gen CI

Signed-off-by: Norman Meier <norman@berty.tech>

* chore: improve buf CI

Signed-off-by: Norman Meier <norman@berty.tech>

* tmp: add debug in CI

Signed-off-by: Norman Meier <norman@berty.tech>

* fix: TIL cp has different behavior on my mac and github CI

Signed-off-by: Norman Meier <norman@berty.tech>

* chore: revert to improbable-eng/grpc-web

Signed-off-by: Norman Meier <norman@berty.tech>

---------

Signed-off-by: Norman Meier <norman@berty.tech>
Co-authored-by: Sakul Budhathoki <sakulbudhathoki977@gmail.com>
  • Loading branch information
n0izn0iz and sakul-budhathoki authored Nov 15, 2023
1 parent 0763d9b commit 7fdba79
Show file tree
Hide file tree
Showing 23 changed files with 26,054 additions and 106 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/buf-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-setup-action@v1.28.0
with:
version: 1.19.0
version: 1.28.0
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Buf lint
run: make lint.buf
12 changes: 8 additions & 4 deletions .github/workflows/gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ jobs:
- uses: actions/setup-node@v3
with:
cache: "yarn"
node-version: 16
node-version: 18

- uses: actions/setup-go@v3
with:
go-version: "^1.18.0"
go-version: "1.19"

- uses: bufbuild/buf-setup-action@v1
- uses: bufbuild/buf-setup-action@v1.28.0
with:
version: 1.19.0
version: 1.28.0
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Install node modules
run: yarn
Expand All @@ -39,5 +40,8 @@ jobs:
- name: Regenerate
run: make generate

- name: Debug
run: ls packages/api/weshnet

- name: Check diff
run: git diff --exit-code
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "^1.18.0"
go-version: "1.19"

- name: Tidy go.mod
run: go mod tidy
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,11 @@ buck-out/
.expo/

# @end expo-cli


# codegen
/.weshgen/


# weshnet
temp/
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,18 @@ node_modules: package.json yarn.lock
generate: generate.protobuf generate.graphql generate.contracts-clients generate.go-networks networks.json

.PHONY: generate.protobuf
generate.protobuf: node_modules
generate.protobuf: node_modules packages/api/weshnet
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
buf generate api

.PHONY: packages/api/weshnet
packages/api/weshnet: node_modules
rm -fr $@
buf generate --template ./weshnet.buf.gen.yaml buf.build/berty/weshnet -o .weshgen
cp -r .weshgen/packages/api $@
rm -fr .weshgen

.PHONY: generate.graphql
generate.graphql:
go run github.com/Khan/genqlient@85e2e8dffd211c83a2be626474993ef68e44a242 go/pkg/holagql/genqlient.yaml
Expand Down
13 changes: 13 additions & 0 deletions buf.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Generated by buf. DO NOT EDIT.
version: v1
deps:
- remote: buf.build
owner: berty
repository: weshnet
commit: a01c754f0f5441d4b4400796c7d170a2
digest: shake256:6ddef4e53054f1203f5db37af95de583811bc9a03adadba1db39e444ccacf2d80e3cbb0bf062cef4264d7c05b1ab24775d79a7561faada41584d560c8ea9f2ad
- remote: buf.build
owner: gogo
repository: protobuf
commit: 5461a3dfa9d941da82028ab185dc2a0e
digest: shake256:37c7c75224982038cb1abf45b481ef06716c1f806ffaa162018d0df092bd11a2a9b62c2d0dc0a2ae43beff86b6014fc0eb8c594ffd84d52ade4b08fca901eadc
2 changes: 2 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ lint:
- DEFAULT
ignore:
- node_modules
deps:
- buf.build/berty/weshnet:a01c754f0f5441d4b4400796c7d170a2
Loading

0 comments on commit 7fdba79

Please sign in to comment.