@apibara/plugin-sqlite 2.1.0-beta.17 → 2.1.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +3 -3
- package/src/index.ts +1 -2
package/dist/index.cjs
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
const indexer = require('@apibara/indexer');
|
|
4
4
|
const plugins = require('@apibara/indexer/plugins');
|
|
5
|
-
const protocol = require('@apibara/protocol');
|
|
6
5
|
const internal = require('@apibara/indexer/internal');
|
|
7
6
|
const plugins$1 = require('@apibara/indexer/internal/plugins');
|
|
7
|
+
const protocol = require('@apibara/protocol');
|
|
8
8
|
|
|
9
9
|
class SqliteStorageError extends Error {
|
|
10
10
|
constructor(message, options) {
|
|
@@ -373,7 +373,7 @@ function sqliteStorage({
|
|
|
373
373
|
if (!finality) {
|
|
374
374
|
throw new SqliteStorageError("finality is undefined");
|
|
375
375
|
}
|
|
376
|
-
if (!endCursor
|
|
376
|
+
if (!endCursor) {
|
|
377
377
|
throw new SqliteStorageError(
|
|
378
378
|
"endCursor is undefined or not a cursor"
|
|
379
379
|
);
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useIndexerContext } from '@apibara/indexer';
|
|
2
2
|
import { defineIndexerPlugin } from '@apibara/indexer/plugins';
|
|
3
|
-
import { normalizeCursor, isCursor } from '@apibara/protocol';
|
|
4
3
|
import { generateIndexerId } from '@apibara/indexer/internal';
|
|
5
4
|
import { useInternalContext } from '@apibara/indexer/internal/plugins';
|
|
5
|
+
import { normalizeCursor } from '@apibara/protocol';
|
|
6
6
|
|
|
7
7
|
class SqliteStorageError extends Error {
|
|
8
8
|
constructor(message, options) {
|
|
@@ -371,7 +371,7 @@ function sqliteStorage({
|
|
|
371
371
|
if (!finality) {
|
|
372
372
|
throw new SqliteStorageError("finality is undefined");
|
|
373
373
|
}
|
|
374
|
-
if (!endCursor
|
|
374
|
+
if (!endCursor) {
|
|
375
375
|
throw new SqliteStorageError(
|
|
376
376
|
"endCursor is undefined or not a cursor"
|
|
377
377
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apibara/plugin-sqlite",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"better-sqlite3": "^9.0.0"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@apibara/indexer": "2.1.0-beta.
|
|
40
|
-
"@apibara/protocol": "2.1.0-beta.
|
|
39
|
+
"@apibara/indexer": "2.1.0-beta.19",
|
|
40
|
+
"@apibara/protocol": "2.1.0-beta.19"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { useIndexerContext } from "@apibara/indexer";
|
|
2
2
|
import { defineIndexerPlugin } from "@apibara/indexer/plugins";
|
|
3
|
-
import { isCursor } from "@apibara/protocol";
|
|
4
3
|
import type { Cursor, DataFinality } from "@apibara/protocol";
|
|
5
4
|
import type { Database as SqliteDatabase } from "better-sqlite3";
|
|
6
5
|
|
|
@@ -218,7 +217,7 @@ export function sqliteStorage<TFilter, TBlock>({
|
|
|
218
217
|
throw new SqliteStorageError("finality is undefined");
|
|
219
218
|
}
|
|
220
219
|
|
|
221
|
-
if (!endCursor
|
|
220
|
+
if (!endCursor) {
|
|
222
221
|
throw new SqliteStorageError(
|
|
223
222
|
"endCursor is undefined or not a cursor",
|
|
224
223
|
);
|