Skip to content

Commit

Permalink
Fixed cursor not creating
Browse files Browse the repository at this point in the history
  • Loading branch information
chamorin committed Jun 29, 2023
1 parent c53a59f commit 7920c23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "substreams-sink",
"version": "0.5.3",
"version": "0.5.4",
"description": "Substreams Sink",
"type": "module",
"exports": "./dist/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ export function run(substreamPackage: Package, options: RunOptions) {
// Block Emitter
const emitter = new BlockEmitter(transport, request, registry);

emitter.on("cursor", (cursor, _) => {
fs.writeFileSync(cursorFile, cursor, "utf-8");
});

// Metrics
if (!metricsDisabled) {
emitter.on("block", (block: BlockScopedData) => {
Expand Down

0 comments on commit 7920c23

Please sign in to comment.