Skip to content

Commit

Permalink
grpc -> grpcjs + generated ts types from proto files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
antonilol committed Nov 6, 2022
1 parent e9b13e3 commit eb39acf
Show file tree
Hide file tree
Showing 596 changed files with 20,619 additions and 1,153 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/update_proto.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Update proto files
on:
schedule:
- cron: "0 0 1 * *"
- cron: '0 0 1 * *'

jobs:
update_proto:
Expand All @@ -22,5 +22,14 @@ jobs:
find lnd/lnrpc -name '*.proto' -exec bash -c 'test -e proto/`basename {}` && cp {} proto' \;
sed -i 's/^import.*\//import "/' proto/*
git add proto
git commit -m "Update proto files" || echo -n
- name: update generated types
run: |
bash grpc_gen_types.sh
npm run build
git add src/grpc/types dist
- name: commit changes
run: |
git config user.name 'Github Actions'
git config user.email [email protected]
git commit -m 'Update proto files and types' || echo -n
git push
2 changes: 1 addition & 1 deletion dist/src/controllers/invoices.js.map

Large diffs are not rendered by default.

18 changes: 12 additions & 6 deletions dist/src/controllers/queries.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/controllers/queries.js.map

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions dist/src/grpc/greenlight.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/grpc/greenlight.js.map

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions dist/src/grpc/interfaces.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit eb39acf

Please sign in to comment.