From 7920c233b86fb7d9c2bdce4300893b660f759384 Mon Sep 17 00:00:00 2001 From: Charles Morin Date: Thu, 29 Jun 2023 09:53:20 -0400 Subject: [PATCH] Fixed cursor not creating --- package-lock.json | 4 ++-- package.json | 2 +- src/run.ts | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51df56b..74bbd88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "substreams-sink", - "version": "0.5.3", + "version": "0.5.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "substreams-sink", - "version": "0.5.3", + "version": "0.5.4", "license": "MIT OR Apache-2.0", "dependencies": { "@substreams/core": "^0.1.10", diff --git a/package.json b/package.json index 2a646b3..4f44461 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "substreams-sink", - "version": "0.5.3", + "version": "0.5.4", "description": "Substreams Sink", "type": "module", "exports": "./dist/index.js", diff --git a/src/run.ts b/src/run.ts index 53b8534..868d32a 100644 --- a/src/run.ts +++ b/src/run.ts @@ -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) => {