Skip to content

Commit 36c4244

Browse files
committed
grpc -> grpcjs + generated ts types from proto files
notes: * grpcjs doesnt like ByteBuffer, it has been replaced with the nodejs native Buffer * grpcjs doesnt like calls without an argument, add {} instead see src/grpc/subscribe.ts:24 * grpcjs converts uint64 in a map key (map<uint64, ...>) to some hash, this is fixed with protobuf_long.patch which is automatically applied after running `npm install` this pr would fix the bug upstream protobufjs/protobuf.js#1669
1 parent af2c8c9 commit 36c4244

File tree

606 files changed

+20787
-1295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

606 files changed

+20787
-1295
lines changed

.github/workflows/update_proto.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Update proto files
22
on:
33
schedule:
4-
- cron: "0 0 1 * *"
4+
- cron: '0 0 1 * *'
55

66
jobs:
77
update_proto:
@@ -19,8 +19,15 @@ jobs:
1919
run: |
2020
find lnd/lnrpc -name '*.proto' -exec bash -c 'test -e proto/`basename {}` && cp {} proto' \;
2121
sed -i 's/^import.*\//import "/' proto/*
22+
git add proto
23+
- name: update generated types
24+
run: |
25+
bash grpc_gen_types.sh
26+
npm run build
27+
git add src/grpc/types dist
28+
- name: commit changes
29+
run: |
2230
git config user.name 'Github Actions'
2331
git config user.email [email protected]
24-
git add proto
25-
git commit -m "Update proto files" || echo -n
32+
git commit -m 'Update proto files and types' || echo -n
2633
git push

dist/src/controllers/invoices.js.map

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

dist/src/controllers/queries.js

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/controllers/queries.js.map

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

dist/src/crypto/rsa.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/src/crypto/rsa.js.map

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

dist/src/grpc/greenlight.js

Lines changed: 29 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)