Skip to content

Commit 84ec8fb

Browse files
authored
refactor: remove generated protobuf files from the repo (#2842)
## Summary Removing generated protobuf files from the public repo ## Future improvements - What should we do with the proto-rpc package's generate protobuf code? Currently the solution requires generateing the code for eslint, check, and test separately. We don't want to include the building of the test files in pre-build. - Could look into pruning all of the bootstrapped packages in the Dockerfile. Based on a quick test the size of the image is the same if only the node is pruned or if all sub packages are pruned separately.
1 parent 630df49 commit 84ec8fb

File tree

53 files changed

+30
-7329
lines changed

Some content is hidden

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

53 files changed

+30
-7329
lines changed

.github/workflows/reusable/cached-build/action.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ runs:
2626
key: cache-build-${{ github.sha }}
2727
path: |
2828
packages/*/dist
29-
packages/proto-rpc/src/proto
30-
packages/dht/src/proto
31-
packages/trackerless-network/src/proto
29+
packages/sdk/src/generated
30+
packages/autocertifier-client/generated
31+
packages/proto-rpc/generated
32+
packages/dht/generated
33+
packages/trackerless-network/generated
3234
- name: ci
3335
if: steps.cache-node-modules.outputs.cache-hit != 'true'
3436
run:

Dockerfile.node

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ FROM node:${NODE_VERSION}-bullseye AS build
33
WORKDIR /usr/src/network
44
COPY . .
55
RUN --mount=type=cache,target=/root/.npm \
6+
npm run bootstrap-pkg --package=@streamr/proto-rpc && \
7+
npm run bootstrap-pkg --package=@streamr/autocertifier-client && \
8+
npm run bootstrap-pkg --package=@streamr/dht && \
9+
npm run bootstrap-pkg --package=@streamr/trackerless-network && \
610
npm run bootstrap-pkg --package=@streamr/sdk && \
711
npm run bootstrap-pkg --package=@streamr/node && \
812
npm run prune-pkg -- @streamr/node
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.DS_Store
22
node_modules
33
dist
4+
generated

packages/autocertifier-client/generated/packages/autocertifier-client/protos/AutoCertifier.client.ts

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

packages/autocertifier-client/generated/packages/autocertifier-client/protos/AutoCertifier.server.ts

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

packages/autocertifier-client/generated/packages/autocertifier-client/protos/AutoCertifier.ts

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

packages/autocertifier-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"license": "STREAMR NETWORK OPEN SOURCE LICENSE",
1313
"author": "Streamr Network AG <[email protected]>",
1414
"scripts": {
15-
"generate-protoc-code": "./proto.sh",
15+
"prebuild": "./proto.sh",
1616
"build": "tsc -b tsconfig.node.json",
1717
"check": "tsc -p ./tsconfig.jest.json",
1818
"clean": "jest --clearCache || true; rm -rf dist *.tsbuildinfo node_modules/.cache || true",

packages/dht/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
node_modules
33
dist
44
coverage
5+
generated
56
test/data/nodeids.json
67
test/data/orderedneighbors.json

0 commit comments

Comments
 (0)