envio 3.0.0-alpha.2 → 3.0.0-alpha.20
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/README.md +164 -30
- package/bin.mjs +49 -0
- package/evm.schema.json +79 -169
- package/fuel.schema.json +50 -21
- package/index.d.ts +497 -1
- package/index.js +4 -0
- package/package.json +42 -31
- package/rescript.json +4 -1
- package/src/Batch.res +11 -8
- package/src/Batch.res.mjs +11 -9
- package/src/ChainFetcher.res +531 -0
- package/src/ChainFetcher.res.mjs +339 -0
- package/src/ChainManager.res +190 -0
- package/src/ChainManager.res.mjs +166 -0
- package/src/Change.res +3 -3
- package/src/Config.gen.ts +19 -0
- package/src/Config.res +737 -22
- package/src/Config.res.mjs +703 -26
- package/src/{Indexer.res → Ctx.res} +1 -1
- package/src/Ecosystem.res +9 -124
- package/src/Ecosystem.res.mjs +19 -160
- package/src/Env.res +30 -74
- package/src/Env.res.mjs +25 -87
- package/src/Envio.gen.ts +3 -1
- package/src/Envio.res +20 -9
- package/src/EventProcessing.res +469 -0
- package/src/EventProcessing.res.mjs +337 -0
- package/src/EvmTypes.gen.ts +6 -0
- package/src/EvmTypes.res +1 -0
- package/src/FetchState.res +1256 -639
- package/src/FetchState.res.mjs +1135 -612
- package/src/GlobalState.res +1190 -0
- package/src/GlobalState.res.mjs +1183 -0
- package/src/GlobalStateManager.res +68 -0
- package/src/GlobalStateManager.res.mjs +75 -0
- package/src/GlobalStateManager.resi +7 -0
- package/src/HandlerLoader.res +89 -0
- package/src/HandlerLoader.res.mjs +79 -0
- package/src/HandlerRegister.res +357 -0
- package/src/HandlerRegister.res.mjs +299 -0
- package/src/{EventRegister.resi → HandlerRegister.resi} +13 -13
- package/src/Hasura.res +111 -175
- package/src/Hasura.res.mjs +88 -150
- package/src/InMemoryStore.res +1 -1
- package/src/InMemoryStore.res.mjs +3 -3
- package/src/InMemoryTable.res +1 -1
- package/src/InMemoryTable.res.mjs +1 -1
- package/src/Internal.gen.ts +4 -0
- package/src/Internal.res +230 -12
- package/src/Internal.res.mjs +115 -1
- package/src/LoadLayer.res +444 -0
- package/src/LoadLayer.res.mjs +296 -0
- package/src/LoadLayer.resi +32 -0
- package/src/LogSelection.res +33 -27
- package/src/LogSelection.res.mjs +6 -0
- package/src/Logging.res +21 -7
- package/src/Logging.res.mjs +16 -8
- package/src/Main.res +377 -0
- package/src/Main.res.mjs +339 -0
- package/src/Persistence.res +7 -21
- package/src/Persistence.res.mjs +3 -3
- package/src/PgStorage.gen.ts +10 -0
- package/src/PgStorage.res +116 -69
- package/src/PgStorage.res.d.mts +5 -0
- package/src/PgStorage.res.mjs +93 -50
- package/src/Prometheus.res +294 -224
- package/src/Prometheus.res.mjs +353 -340
- package/src/ReorgDetection.res +6 -10
- package/src/ReorgDetection.res.mjs +6 -6
- package/src/SafeCheckpointTracking.res +4 -4
- package/src/SafeCheckpointTracking.res.mjs +2 -2
- package/src/Sink.res +4 -2
- package/src/Sink.res.mjs +2 -1
- package/src/TableIndices.res +0 -1
- package/src/TestIndexer.res +692 -0
- package/src/TestIndexer.res.mjs +527 -0
- package/src/TestIndexerProxyStorage.res +205 -0
- package/src/TestIndexerProxyStorage.res.mjs +151 -0
- package/src/TopicFilter.res +1 -1
- package/src/Types.ts +1 -1
- package/src/UserContext.res +424 -0
- package/src/UserContext.res.mjs +279 -0
- package/src/Utils.res +97 -26
- package/src/Utils.res.mjs +91 -44
- package/src/bindings/BigInt.res +10 -0
- package/src/bindings/BigInt.res.mjs +15 -0
- package/src/bindings/ClickHouse.res +120 -23
- package/src/bindings/ClickHouse.res.mjs +118 -28
- package/src/bindings/DateFns.res +74 -0
- package/src/bindings/DateFns.res.mjs +22 -0
- package/src/bindings/EventSource.res +8 -1
- package/src/bindings/EventSource.res.mjs +8 -1
- package/src/bindings/Express.res +1 -0
- package/src/bindings/Hrtime.res +14 -1
- package/src/bindings/Hrtime.res.mjs +22 -2
- package/src/bindings/Hrtime.resi +4 -0
- package/src/bindings/Lodash.res +0 -1
- package/src/bindings/NodeJs.res +49 -3
- package/src/bindings/NodeJs.res.mjs +11 -3
- package/src/bindings/Pino.res +24 -10
- package/src/bindings/Pino.res.mjs +14 -8
- package/src/bindings/Postgres.gen.ts +8 -0
- package/src/bindings/Postgres.res +5 -1
- package/src/bindings/Postgres.res.d.mts +5 -0
- package/src/bindings/PromClient.res +0 -10
- package/src/bindings/PromClient.res.mjs +0 -3
- package/src/bindings/Vitest.res +142 -0
- package/src/bindings/Vitest.res.mjs +9 -0
- package/src/bindings/WebSocket.res +27 -0
- package/src/bindings/WebSocket.res.mjs +2 -0
- package/src/bindings/Yargs.res +8 -0
- package/src/bindings/Yargs.res.mjs +2 -0
- package/src/db/EntityHistory.res +7 -7
- package/src/db/EntityHistory.res.mjs +9 -9
- package/src/db/InternalTable.res +59 -111
- package/src/db/InternalTable.res.mjs +73 -104
- package/src/db/Table.res +27 -8
- package/src/db/Table.res.mjs +25 -14
- package/src/sources/Evm.res +84 -0
- package/src/sources/Evm.res.mjs +105 -0
- package/src/sources/EvmChain.res +94 -0
- package/src/sources/EvmChain.res.mjs +60 -0
- package/src/sources/Fuel.res +19 -34
- package/src/sources/Fuel.res.mjs +34 -16
- package/src/sources/FuelSDK.res +38 -0
- package/src/sources/FuelSDK.res.mjs +29 -0
- package/src/sources/HyperFuel.res +2 -2
- package/src/sources/HyperFuel.resi +1 -1
- package/src/sources/HyperFuelClient.res +2 -2
- package/src/sources/HyperFuelSource.res +33 -13
- package/src/sources/HyperFuelSource.res.mjs +24 -16
- package/src/sources/HyperSync.res +36 -6
- package/src/sources/HyperSync.res.mjs +9 -7
- package/src/sources/HyperSync.resi +4 -0
- package/src/sources/HyperSyncClient.res +1 -1
- package/src/sources/HyperSyncHeightStream.res +47 -116
- package/src/sources/HyperSyncHeightStream.res.mjs +46 -73
- package/src/sources/HyperSyncSource.res +118 -139
- package/src/sources/HyperSyncSource.res.mjs +104 -121
- package/src/sources/Rpc.res +86 -14
- package/src/sources/Rpc.res.mjs +101 -9
- package/src/sources/RpcSource.res +621 -364
- package/src/sources/RpcSource.res.mjs +843 -410
- package/src/sources/RpcWebSocketHeightStream.res +181 -0
- package/src/sources/RpcWebSocketHeightStream.res.mjs +196 -0
- package/src/sources/Source.res +7 -5
- package/src/sources/SourceManager.res +325 -225
- package/src/sources/SourceManager.res.mjs +314 -171
- package/src/sources/SourceManager.resi +17 -6
- package/src/sources/Svm.res +81 -0
- package/src/sources/Svm.res.mjs +90 -0
- package/src/tui/Tui.res +247 -0
- package/src/tui/Tui.res.mjs +337 -0
- package/src/tui/bindings/Ink.res +371 -0
- package/src/tui/bindings/Ink.res.mjs +72 -0
- package/src/tui/bindings/Style.res +123 -0
- package/src/tui/bindings/Style.res.mjs +2 -0
- package/src/tui/components/BufferedProgressBar.res +40 -0
- package/src/tui/components/BufferedProgressBar.res.mjs +57 -0
- package/src/tui/components/CustomHooks.res +122 -0
- package/src/tui/components/CustomHooks.res.mjs +179 -0
- package/src/tui/components/Messages.res +41 -0
- package/src/tui/components/Messages.res.mjs +75 -0
- package/src/tui/components/SyncETA.res +174 -0
- package/src/tui/components/SyncETA.res.mjs +263 -0
- package/src/tui/components/TuiData.res +47 -0
- package/src/tui/components/TuiData.res.mjs +34 -0
- package/svm.schema.json +112 -0
- package/bin.js +0 -48
- package/src/EventRegister.res +0 -241
- package/src/EventRegister.res.mjs +0 -240
- package/src/bindings/Ethers.gen.ts +0 -14
- package/src/bindings/Ethers.res +0 -204
- package/src/bindings/Ethers.res.mjs +0 -130
- /package/src/{Indexer.res.mjs → Ctx.res.mjs} +0 -0
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as Env from "../Env.res.mjs";
|
|
4
|
+
import * as $$Ink from "./bindings/Ink.res.mjs";
|
|
5
|
+
import * as $$Ink$1 from "ink";
|
|
6
|
+
import * as Caml from "rescript/lib/es6/caml.js";
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import * as $$String from "rescript/lib/es6/string.js";
|
|
9
|
+
import * as SyncETA from "./components/SyncETA.res.mjs";
|
|
10
|
+
import * as TuiData from "./components/TuiData.res.mjs";
|
|
11
|
+
import * as ChainMap from "../ChainMap.res.mjs";
|
|
12
|
+
import * as Messages from "./components/Messages.res.mjs";
|
|
13
|
+
import * as Belt_Array from "rescript/lib/es6/belt_Array.js";
|
|
14
|
+
import * as FetchState from "../FetchState.res.mjs";
|
|
15
|
+
import * as Belt_Option from "rescript/lib/es6/belt_Option.js";
|
|
16
|
+
import * as Caml_option from "rescript/lib/es6/caml_option.js";
|
|
17
|
+
import * as ChainFetcher from "../ChainFetcher.res.mjs";
|
|
18
|
+
import InkBigText from "ink-big-text";
|
|
19
|
+
import * as SourceManager from "../sources/SourceManager.res.mjs";
|
|
20
|
+
import * as JsxRuntime from "react/jsx-runtime";
|
|
21
|
+
import * as BufferedProgressBar from "./components/BufferedProgressBar.res.mjs";
|
|
22
|
+
|
|
23
|
+
function Tui$ChainLine(props) {
|
|
24
|
+
var poweredByHyperSync = props.poweredByHyperSync;
|
|
25
|
+
var endBlock = props.endBlock;
|
|
26
|
+
var startBlock = props.startBlock;
|
|
27
|
+
var sourceBlock = props.sourceBlock;
|
|
28
|
+
var bufferBlock = props.bufferBlock;
|
|
29
|
+
var progressBlock = props.progressBlock;
|
|
30
|
+
var chainId = props.chainId;
|
|
31
|
+
var chainsWidth = Caml.int_min(props.stdoutColumns - 2 | 0, 60);
|
|
32
|
+
var headerWidth = props.maxChainIdLength + 10 | 0;
|
|
33
|
+
if (progressBlock !== undefined && bufferBlock !== undefined && sourceBlock !== undefined) {
|
|
34
|
+
var toBlock = endBlock !== undefined && sourceBlock >= endBlock ? endBlock : sourceBlock;
|
|
35
|
+
var progressBlockStr = TuiData.formatLocaleString(progressBlock);
|
|
36
|
+
var toBlockStr = TuiData.formatLocaleString(toBlock);
|
|
37
|
+
var eventsStr = TuiData.formatFloatLocaleString(props.eventsProcessed);
|
|
38
|
+
var blocksText = "Blocks: " + progressBlockStr + " / " + toBlockStr + (
|
|
39
|
+
Belt_Option.isSome(endBlock) ? " (End Block)" : ""
|
|
40
|
+
) + " ";
|
|
41
|
+
var eventsText = "Events: " + eventsStr;
|
|
42
|
+
var fitsSameLine = (blocksText.length + eventsText.length | 0) <= chainsWidth;
|
|
43
|
+
return JsxRuntime.jsxs($$Ink$1.Box, {
|
|
44
|
+
children: [
|
|
45
|
+
JsxRuntime.jsxs($$Ink$1.Box, {
|
|
46
|
+
children: [
|
|
47
|
+
JsxRuntime.jsxs($$Ink$1.Box, {
|
|
48
|
+
children: [
|
|
49
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
50
|
+
children: "Chain: "
|
|
51
|
+
}),
|
|
52
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
53
|
+
children: chainId,
|
|
54
|
+
bold: true
|
|
55
|
+
}),
|
|
56
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
57
|
+
children: " "
|
|
58
|
+
}),
|
|
59
|
+
poweredByHyperSync ? JsxRuntime.jsx($$Ink$1.Text, {
|
|
60
|
+
children: "⚡",
|
|
61
|
+
color: "#FFBB2F"
|
|
62
|
+
}) : null
|
|
63
|
+
],
|
|
64
|
+
width: headerWidth
|
|
65
|
+
}),
|
|
66
|
+
JsxRuntime.jsx(BufferedProgressBar.make, {
|
|
67
|
+
loaded: progressBlock - startBlock | 0,
|
|
68
|
+
buffered: bufferBlock - startBlock | 0,
|
|
69
|
+
outOf: toBlock - startBlock | 0,
|
|
70
|
+
barWidth: chainsWidth - headerWidth | 0,
|
|
71
|
+
loadingColor: "#FFBB2F"
|
|
72
|
+
})
|
|
73
|
+
],
|
|
74
|
+
width: chainsWidth,
|
|
75
|
+
flexDirection: "row"
|
|
76
|
+
}),
|
|
77
|
+
JsxRuntime.jsxs($$Ink$1.Box, {
|
|
78
|
+
children: [
|
|
79
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
80
|
+
children: blocksText,
|
|
81
|
+
color: "gray"
|
|
82
|
+
}),
|
|
83
|
+
fitsSameLine ? JsxRuntime.jsx($$Ink$1.Text, {
|
|
84
|
+
children: eventsText,
|
|
85
|
+
color: "gray"
|
|
86
|
+
}) : null
|
|
87
|
+
],
|
|
88
|
+
flexDirection: "row"
|
|
89
|
+
}),
|
|
90
|
+
fitsSameLine ? null : JsxRuntime.jsx($$Ink$1.Box, {
|
|
91
|
+
children: Caml_option.some(JsxRuntime.jsx($$Ink$1.Text, {
|
|
92
|
+
children: $$String.trim(eventsText),
|
|
93
|
+
color: "gray"
|
|
94
|
+
})),
|
|
95
|
+
flexDirection: "row"
|
|
96
|
+
}),
|
|
97
|
+
JsxRuntime.jsx($$Ink.Newline.make, {})
|
|
98
|
+
],
|
|
99
|
+
flexDirection: "column"
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return JsxRuntime.jsxs(JsxRuntime.Fragment, {
|
|
103
|
+
children: [
|
|
104
|
+
JsxRuntime.jsxs($$Ink$1.Box, {
|
|
105
|
+
children: [
|
|
106
|
+
JsxRuntime.jsxs($$Ink$1.Box, {
|
|
107
|
+
children: [
|
|
108
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
109
|
+
children: "Chain: "
|
|
110
|
+
}),
|
|
111
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
112
|
+
children: chainId,
|
|
113
|
+
bold: true
|
|
114
|
+
}),
|
|
115
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
116
|
+
children: " "
|
|
117
|
+
}),
|
|
118
|
+
poweredByHyperSync ? JsxRuntime.jsx($$Ink$1.Text, {
|
|
119
|
+
children: "⚡",
|
|
120
|
+
color: "#FFBB2F"
|
|
121
|
+
}) : null
|
|
122
|
+
],
|
|
123
|
+
width: headerWidth
|
|
124
|
+
}),
|
|
125
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
126
|
+
children: "Loading progress..."
|
|
127
|
+
})
|
|
128
|
+
],
|
|
129
|
+
width: chainsWidth,
|
|
130
|
+
flexDirection: "row"
|
|
131
|
+
}),
|
|
132
|
+
JsxRuntime.jsx($$Ink.Newline.make, {})
|
|
133
|
+
]
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
var ChainLine = {
|
|
138
|
+
make: Tui$ChainLine
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
function Tui$TotalEventsProcessed(props) {
|
|
142
|
+
return JsxRuntime.jsxs($$Ink$1.Text, {
|
|
143
|
+
children: [
|
|
144
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
145
|
+
children: "Total Events: ",
|
|
146
|
+
bold: true
|
|
147
|
+
}),
|
|
148
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
149
|
+
children: TuiData.formatFloatLocaleString(props.totalEventsProcessed),
|
|
150
|
+
color: "#FFBB2F"
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
var TotalEventsProcessed = {
|
|
157
|
+
make: Tui$TotalEventsProcessed
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
function Tui$App(props) {
|
|
161
|
+
var getState = props.getState;
|
|
162
|
+
var stdoutColumns = $$Ink.Hooks.useStdoutColumns();
|
|
163
|
+
var match = React.useState(function () {
|
|
164
|
+
return getState();
|
|
165
|
+
});
|
|
166
|
+
var setState = match[1];
|
|
167
|
+
var state = match[0];
|
|
168
|
+
React.useEffect((function () {
|
|
169
|
+
var intervalId = setInterval((function () {
|
|
170
|
+
setState(function (param) {
|
|
171
|
+
return getState();
|
|
172
|
+
});
|
|
173
|
+
}), 500);
|
|
174
|
+
return (function () {
|
|
175
|
+
clearInterval(intervalId);
|
|
176
|
+
});
|
|
177
|
+
}), [getState]);
|
|
178
|
+
var chains = Belt_Array.map(ChainMap.values(state.chainManager.chainFetchers), (function (cf) {
|
|
179
|
+
var numEventsProcessed = cf.numEventsProcessed;
|
|
180
|
+
var latestFetchedBlockNumber = Caml.int_max(FetchState.bufferBlockNumber(cf.fetchState), 0);
|
|
181
|
+
var hasProcessedToEndblock = ChainFetcher.hasProcessedToEndblock(cf);
|
|
182
|
+
var knownHeight = ChainFetcher.hasProcessedToEndblock(cf) ? Belt_Option.getWithDefault(cf.fetchState.endBlock, cf.fetchState.knownHeight) : cf.fetchState.knownHeight;
|
|
183
|
+
var firstEventBlock = cf.fetchState.firstEventBlock;
|
|
184
|
+
var progress;
|
|
185
|
+
if (hasProcessedToEndblock) {
|
|
186
|
+
progress = {
|
|
187
|
+
TAG: "Synced",
|
|
188
|
+
_0: {
|
|
189
|
+
firstEventBlockNumber: Belt_Option.getWithDefault(firstEventBlock, 0),
|
|
190
|
+
latestProcessedBlock: cf.committedProgressBlockNumber,
|
|
191
|
+
numEventsProcessed: numEventsProcessed,
|
|
192
|
+
timestampCaughtUpToHeadOrEndblock: Belt_Option.getWithDefault(cf.timestampCaughtUpToHeadOrEndblock, new Date(Date.now()))
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
} else {
|
|
196
|
+
var match = cf.timestampCaughtUpToHeadOrEndblock;
|
|
197
|
+
progress = firstEventBlock !== undefined ? (
|
|
198
|
+
match !== undefined ? ({
|
|
199
|
+
TAG: "Synced",
|
|
200
|
+
_0: {
|
|
201
|
+
firstEventBlockNumber: firstEventBlock,
|
|
202
|
+
latestProcessedBlock: cf.committedProgressBlockNumber,
|
|
203
|
+
numEventsProcessed: numEventsProcessed,
|
|
204
|
+
timestampCaughtUpToHeadOrEndblock: Caml_option.valFromOption(match)
|
|
205
|
+
}
|
|
206
|
+
}) : ({
|
|
207
|
+
TAG: "Syncing",
|
|
208
|
+
_0: {
|
|
209
|
+
firstEventBlockNumber: firstEventBlock,
|
|
210
|
+
latestProcessedBlock: cf.committedProgressBlockNumber,
|
|
211
|
+
numEventsProcessed: numEventsProcessed
|
|
212
|
+
}
|
|
213
|
+
})
|
|
214
|
+
) : "SearchingForEvents";
|
|
215
|
+
}
|
|
216
|
+
return {
|
|
217
|
+
chainId: String(cf.chainConfig.id),
|
|
218
|
+
eventsProcessed: numEventsProcessed,
|
|
219
|
+
progressBlock: cf.committedProgressBlockNumber < cf.fetchState.startBlock ? cf.fetchState.startBlock : cf.committedProgressBlockNumber,
|
|
220
|
+
bufferBlock: latestFetchedBlockNumber,
|
|
221
|
+
sourceBlock: cf.fetchState.knownHeight,
|
|
222
|
+
startBlock: cf.fetchState.startBlock,
|
|
223
|
+
endBlock: cf.fetchState.endBlock,
|
|
224
|
+
firstEventBlockNumber: cf.fetchState.firstEventBlock,
|
|
225
|
+
poweredByHyperSync: SourceManager.getActiveSource(cf.sourceManager).poweredByHyperSync,
|
|
226
|
+
progress: progress,
|
|
227
|
+
latestFetchedBlockNumber: latestFetchedBlockNumber,
|
|
228
|
+
knownHeight: knownHeight
|
|
229
|
+
};
|
|
230
|
+
}));
|
|
231
|
+
var totalEventsProcessed = Belt_Array.reduce(chains, 0, (function (acc, chain) {
|
|
232
|
+
return acc + chain.eventsProcessed;
|
|
233
|
+
}));
|
|
234
|
+
var maxChainIdLength = Belt_Array.reduce(chains, 0, (function (acc, chain) {
|
|
235
|
+
var chainIdLength = chain.chainId.length;
|
|
236
|
+
if (chainIdLength > acc) {
|
|
237
|
+
return chainIdLength;
|
|
238
|
+
} else {
|
|
239
|
+
return acc;
|
|
240
|
+
}
|
|
241
|
+
}));
|
|
242
|
+
var defaultPassword = "testing";
|
|
243
|
+
return JsxRuntime.jsxs($$Ink$1.Box, {
|
|
244
|
+
children: [
|
|
245
|
+
JsxRuntime.jsx(InkBigText, {
|
|
246
|
+
text: "envio",
|
|
247
|
+
font: chains.length > 5 ? "tiny" : "block",
|
|
248
|
+
colors: [
|
|
249
|
+
"#FFBB2F",
|
|
250
|
+
"#9860E5"
|
|
251
|
+
],
|
|
252
|
+
space: false
|
|
253
|
+
}),
|
|
254
|
+
JsxRuntime.jsx($$Ink.Newline.make, {}),
|
|
255
|
+
Belt_Array.mapWithIndex(chains, (function (i, chainData) {
|
|
256
|
+
return JsxRuntime.jsx(Tui$ChainLine, {
|
|
257
|
+
chainId: chainData.chainId,
|
|
258
|
+
maxChainIdLength: maxChainIdLength,
|
|
259
|
+
stdoutColumns: stdoutColumns,
|
|
260
|
+
progressBlock: chainData.progressBlock,
|
|
261
|
+
bufferBlock: chainData.bufferBlock,
|
|
262
|
+
sourceBlock: chainData.sourceBlock,
|
|
263
|
+
startBlock: chainData.startBlock,
|
|
264
|
+
endBlock: chainData.endBlock,
|
|
265
|
+
poweredByHyperSync: chainData.poweredByHyperSync,
|
|
266
|
+
eventsProcessed: chainData.eventsProcessed
|
|
267
|
+
}, String(i));
|
|
268
|
+
})),
|
|
269
|
+
JsxRuntime.jsx(Tui$TotalEventsProcessed, {
|
|
270
|
+
totalEventsProcessed: totalEventsProcessed
|
|
271
|
+
}),
|
|
272
|
+
JsxRuntime.jsx(SyncETA.make, {
|
|
273
|
+
chains: chains,
|
|
274
|
+
indexerStartTime: state.indexerStartTime
|
|
275
|
+
}),
|
|
276
|
+
JsxRuntime.jsx($$Ink.Newline.make, {}),
|
|
277
|
+
JsxRuntime.jsxs($$Ink$1.Box, {
|
|
278
|
+
children: [
|
|
279
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
280
|
+
children: "GraphQL: "
|
|
281
|
+
}),
|
|
282
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
283
|
+
children: Env.Hasura.url,
|
|
284
|
+
color: "#6CBFEE",
|
|
285
|
+
underline: true
|
|
286
|
+
}),
|
|
287
|
+
Env.Hasura.secret === defaultPassword ? JsxRuntime.jsx($$Ink$1.Text, {
|
|
288
|
+
children: " (password: " + defaultPassword + ")",
|
|
289
|
+
color: "gray"
|
|
290
|
+
}) : null
|
|
291
|
+
],
|
|
292
|
+
flexDirection: "row"
|
|
293
|
+
}),
|
|
294
|
+
JsxRuntime.jsxs($$Ink$1.Box, {
|
|
295
|
+
children: [
|
|
296
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
297
|
+
children: "Dev Console: "
|
|
298
|
+
}),
|
|
299
|
+
JsxRuntime.jsx($$Ink$1.Text, {
|
|
300
|
+
children: Env.envioAppUrl + "/console",
|
|
301
|
+
color: "#6CBFEE",
|
|
302
|
+
underline: true
|
|
303
|
+
})
|
|
304
|
+
],
|
|
305
|
+
flexDirection: "row"
|
|
306
|
+
}),
|
|
307
|
+
JsxRuntime.jsx(Messages.make, {
|
|
308
|
+
config: state.ctx.config
|
|
309
|
+
})
|
|
310
|
+
],
|
|
311
|
+
flexDirection: "column"
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
var App = {
|
|
316
|
+
make: Tui$App
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
function start(getState) {
|
|
320
|
+
var match = $$Ink.render(undefined, JsxRuntime.jsx(Tui$App, {
|
|
321
|
+
getState: getState
|
|
322
|
+
}));
|
|
323
|
+
var rerender = match.rerender;
|
|
324
|
+
return function () {
|
|
325
|
+
rerender(JsxRuntime.jsx(Tui$App, {
|
|
326
|
+
getState: getState
|
|
327
|
+
}));
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export {
|
|
332
|
+
ChainLine ,
|
|
333
|
+
TotalEventsProcessed ,
|
|
334
|
+
App ,
|
|
335
|
+
start ,
|
|
336
|
+
}
|
|
337
|
+
/* Env Not a pure module */
|