@secondlayer/subgraphs 3.6.1 → 3.7.1
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/src/index.js +12 -8
- package/dist/src/index.js.map +4 -4
- package/dist/src/runtime/block-processor.js +12 -8
- package/dist/src/runtime/block-processor.js.map +4 -4
- package/dist/src/runtime/catchup.js +12 -8
- package/dist/src/runtime/catchup.js.map +4 -4
- package/dist/src/runtime/processor.js +338 -64
- package/dist/src/runtime/processor.js.map +10 -7
- package/dist/src/runtime/reindex.js +12 -8
- package/dist/src/runtime/reindex.js.map +4 -4
- package/dist/src/runtime/reorg.js +12 -8
- package/dist/src/runtime/reorg.js.map +4 -4
- package/dist/src/runtime/replay.js +12 -7
- package/dist/src/runtime/replay.js.map +3 -3
- package/dist/src/service.js +343 -68
- package/dist/src/service.js.map +11 -8
- package/package.json +2 -2
package/dist/src/index.js
CHANGED
|
@@ -1225,19 +1225,21 @@ function sourceFilters(subgraph) {
|
|
|
1225
1225
|
const sources = subgraph.sources;
|
|
1226
1226
|
return Array.isArray(sources) ? sources : Object.values(sources);
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1229
|
-
|
|
1230
|
-
if (filters.some((f) => TX_SOURCE_TYPES.has(f.type))) {
|
|
1228
|
+
function indexEventTypesForFilterTypes(filterTypes) {
|
|
1229
|
+
if (filterTypes.some((t) => TX_SOURCE_TYPES.has(t))) {
|
|
1231
1230
|
return ALL_INDEX_EVENT_TYPES;
|
|
1232
1231
|
}
|
|
1233
1232
|
const types = new Set;
|
|
1234
|
-
for (const
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
types.add(
|
|
1233
|
+
for (const t of filterTypes) {
|
|
1234
|
+
const indexType = EVENT_FILTER_TO_INDEX_TYPE[t];
|
|
1235
|
+
if (indexType)
|
|
1236
|
+
types.add(indexType);
|
|
1238
1237
|
}
|
|
1239
1238
|
return [...types];
|
|
1240
1239
|
}
|
|
1240
|
+
function referencedIndexEventTypes(subgraph) {
|
|
1241
|
+
return indexEventTypesForFilterTypes(sourceFilters(subgraph).map((f) => f.type));
|
|
1242
|
+
}
|
|
1241
1243
|
function isStreamsIndexEligible(subgraph) {
|
|
1242
1244
|
if (Array.isArray(subgraph.sources))
|
|
1243
1245
|
return false;
|
|
@@ -1499,6 +1501,8 @@ class SubscriptionMatcher {
|
|
|
1499
1501
|
for (const sub of subs) {
|
|
1500
1502
|
if (sub.status !== "active")
|
|
1501
1503
|
continue;
|
|
1504
|
+
if (sub.kind !== "subgraph" || !sub.subgraph_name || !sub.table_name)
|
|
1505
|
+
continue;
|
|
1502
1506
|
this.byId.set(sub.id, sub);
|
|
1503
1507
|
const k = key(sub.subgraph_name, sub.table_name);
|
|
1504
1508
|
const arr = this.byKey.get(k);
|
|
@@ -2839,5 +2843,5 @@ export {
|
|
|
2839
2843
|
backfillSubgraph
|
|
2840
2844
|
};
|
|
2841
2845
|
|
|
2842
|
-
//# debugId=
|
|
2846
|
+
//# debugId=2BE22F6928E6804264756E2164756E21
|
|
2843
2847
|
//# sourceMappingURL=index.js.map
|