Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/tired-suns-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@scrawn/analytics": patch
"@scrawn/core": patch
---

feat: migrate proto to ts-proto/@bufbuild/protobuf, add retry mechanism
2 changes: 1 addition & 1 deletion bun.lock

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

2 changes: 1 addition & 1 deletion packages/scrawn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"proto:push": "cd proto && git add . && git commit -s -m \"$1\" && git push && cd .."
},
"dependencies": {
"@bufbuild/protobuf": "^2.12.0",
"@bufbuild/protobuf": "2.12.0",
"@grpc/grpc-js": "^1.13.1",
"chalk": "^5.6.2",
"pino": "^10.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/scrawn/proto
Submodule proto updated 1 files
+4 −0 event/v1/event.proto
10 changes: 6 additions & 4 deletions packages/scrawn/scripts/cleanup-grpc-js.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ const path = require("path");

const genRoot = path.join(__dirname, "..", "src", "gen");

function deleteGrpcJs(dirPath) {
const removeSuffixes = ["_grpc_pb.js", "_pb.d.ts"];

function clean(dirPath) {
for (const entry of fs.readdirSync(dirPath, { withFileTypes: true })) {
const fullPath = path.join(dirPath, entry.name);
if (entry.isDirectory()) {
deleteGrpcJs(fullPath);
} else if (entry.name.endsWith("_grpc_pb.js")) {
clean(fullPath);
} else if (removeSuffixes.some((s) => entry.name.endsWith(s))) {
fs.rmSync(fullPath, { force: true });
}
}
}

if (fs.existsSync(genRoot)) {
deleteGrpcJs(genRoot);
clean(genRoot);
}
80 changes: 78 additions & 2 deletions packages/scrawn/src/gen/event/v1/event.ts

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

Loading