@rivetkit/engine-envoy-protocol 0.0.0-pr.4854.b12798b → 0.0.0-pr.4856.c7f322b
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.d.ts +9 -201
- package/dist/index.js +50 -501
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -165,38 +165,12 @@ type KvResponseData = {
|
|
|
165
165
|
};
|
|
166
166
|
declare function readKvResponseData(bc: bare.ByteCursor): KvResponseData;
|
|
167
167
|
declare function writeKvResponseData(bc: bare.ByteCursor, x: KvResponseData): void;
|
|
168
|
-
type SqliteGeneration = u64;
|
|
169
|
-
declare function readSqliteGeneration(bc: bare.ByteCursor): SqliteGeneration;
|
|
170
|
-
declare function writeSqliteGeneration(bc: bare.ByteCursor, x: SqliteGeneration): void;
|
|
171
|
-
type SqliteTxid = u64;
|
|
172
|
-
declare function readSqliteTxid(bc: bare.ByteCursor): SqliteTxid;
|
|
173
|
-
declare function writeSqliteTxid(bc: bare.ByteCursor, x: SqliteTxid): void;
|
|
174
168
|
type SqlitePgno = u32;
|
|
175
169
|
declare function readSqlitePgno(bc: bare.ByteCursor): SqlitePgno;
|
|
176
170
|
declare function writeSqlitePgno(bc: bare.ByteCursor, x: SqlitePgno): void;
|
|
177
|
-
type SqliteStageId = u64;
|
|
178
|
-
declare function readSqliteStageId(bc: bare.ByteCursor): SqliteStageId;
|
|
179
|
-
declare function writeSqliteStageId(bc: bare.ByteCursor, x: SqliteStageId): void;
|
|
180
171
|
type SqlitePageBytes = ArrayBuffer;
|
|
181
172
|
declare function readSqlitePageBytes(bc: bare.ByteCursor): SqlitePageBytes;
|
|
182
173
|
declare function writeSqlitePageBytes(bc: bare.ByteCursor, x: SqlitePageBytes): void;
|
|
183
|
-
type SqliteMeta = {
|
|
184
|
-
readonly generation: SqliteGeneration;
|
|
185
|
-
readonly headTxid: SqliteTxid;
|
|
186
|
-
readonly materializedTxid: SqliteTxid;
|
|
187
|
-
readonly dbSizePages: u32;
|
|
188
|
-
readonly pageSize: u32;
|
|
189
|
-
readonly creationTsMs: i64;
|
|
190
|
-
readonly maxDeltaBytes: u64;
|
|
191
|
-
};
|
|
192
|
-
declare function readSqliteMeta(bc: bare.ByteCursor): SqliteMeta;
|
|
193
|
-
declare function writeSqliteMeta(bc: bare.ByteCursor, x: SqliteMeta): void;
|
|
194
|
-
type SqliteFenceMismatch = {
|
|
195
|
-
readonly actualMeta: SqliteMeta;
|
|
196
|
-
readonly reason: string;
|
|
197
|
-
};
|
|
198
|
-
declare function readSqliteFenceMismatch(bc: bare.ByteCursor): SqliteFenceMismatch;
|
|
199
|
-
declare function writeSqliteFenceMismatch(bc: bare.ByteCursor, x: SqliteFenceMismatch): void;
|
|
200
174
|
type SqliteDirtyPage = {
|
|
201
175
|
readonly pgno: SqlitePgno;
|
|
202
176
|
readonly bytes: SqlitePageBytes;
|
|
@@ -211,14 +185,14 @@ declare function readSqliteFetchedPage(bc: bare.ByteCursor): SqliteFetchedPage;
|
|
|
211
185
|
declare function writeSqliteFetchedPage(bc: bare.ByteCursor, x: SqliteFetchedPage): void;
|
|
212
186
|
type SqliteGetPagesRequest = {
|
|
213
187
|
readonly actorId: Id;
|
|
214
|
-
readonly generation: SqliteGeneration;
|
|
215
188
|
readonly pgnos: readonly SqlitePgno[];
|
|
189
|
+
readonly expectedGeneration: u64 | null;
|
|
190
|
+
readonly expectedHeadTxid: u64 | null;
|
|
216
191
|
};
|
|
217
192
|
declare function readSqliteGetPagesRequest(bc: bare.ByteCursor): SqliteGetPagesRequest;
|
|
218
193
|
declare function writeSqliteGetPagesRequest(bc: bare.ByteCursor, x: SqliteGetPagesRequest): void;
|
|
219
194
|
type SqliteGetPagesOk = {
|
|
220
195
|
readonly pages: readonly SqliteFetchedPage[];
|
|
221
|
-
readonly meta: SqliteMeta;
|
|
222
196
|
};
|
|
223
197
|
declare function readSqliteGetPagesOk(bc: bare.ByteCursor): SqliteGetPagesOk;
|
|
224
198
|
declare function writeSqliteGetPagesOk(bc: bare.ByteCursor, x: SqliteGetPagesOk): void;
|
|
@@ -230,9 +204,6 @@ declare function writeSqliteErrorResponse(bc: bare.ByteCursor, x: SqliteErrorRes
|
|
|
230
204
|
type SqliteGetPagesResponse = {
|
|
231
205
|
readonly tag: "SqliteGetPagesOk";
|
|
232
206
|
readonly val: SqliteGetPagesOk;
|
|
233
|
-
} | {
|
|
234
|
-
readonly tag: "SqliteFenceMismatch";
|
|
235
|
-
readonly val: SqliteFenceMismatch;
|
|
236
207
|
} | {
|
|
237
208
|
readonly tag: "SqliteErrorResponse";
|
|
238
209
|
readonly val: SqliteErrorResponse;
|
|
@@ -241,132 +212,24 @@ declare function readSqliteGetPagesResponse(bc: bare.ByteCursor): SqliteGetPages
|
|
|
241
212
|
declare function writeSqliteGetPagesResponse(bc: bare.ByteCursor, x: SqliteGetPagesResponse): void;
|
|
242
213
|
type SqliteCommitRequest = {
|
|
243
214
|
readonly actorId: Id;
|
|
244
|
-
readonly generation: SqliteGeneration;
|
|
245
|
-
readonly expectedHeadTxid: SqliteTxid;
|
|
246
215
|
readonly dirtyPages: readonly SqliteDirtyPage[];
|
|
247
|
-
readonly
|
|
216
|
+
readonly dbSizePages: u32;
|
|
217
|
+
readonly nowMs: i64;
|
|
218
|
+
readonly expectedGeneration: u64 | null;
|
|
219
|
+
readonly expectedHeadTxid: u64 | null;
|
|
248
220
|
};
|
|
249
221
|
declare function readSqliteCommitRequest(bc: bare.ByteCursor): SqliteCommitRequest;
|
|
250
222
|
declare function writeSqliteCommitRequest(bc: bare.ByteCursor, x: SqliteCommitRequest): void;
|
|
251
|
-
type SqliteCommitOk =
|
|
252
|
-
readonly newHeadTxid: SqliteTxid;
|
|
253
|
-
readonly meta: SqliteMeta;
|
|
254
|
-
};
|
|
255
|
-
declare function readSqliteCommitOk(bc: bare.ByteCursor): SqliteCommitOk;
|
|
256
|
-
declare function writeSqliteCommitOk(bc: bare.ByteCursor, x: SqliteCommitOk): void;
|
|
257
|
-
type SqliteCommitTooLarge = {
|
|
258
|
-
readonly actualSizeBytes: u64;
|
|
259
|
-
readonly maxSizeBytes: u64;
|
|
260
|
-
};
|
|
261
|
-
declare function readSqliteCommitTooLarge(bc: bare.ByteCursor): SqliteCommitTooLarge;
|
|
262
|
-
declare function writeSqliteCommitTooLarge(bc: bare.ByteCursor, x: SqliteCommitTooLarge): void;
|
|
223
|
+
type SqliteCommitOk = null;
|
|
263
224
|
type SqliteCommitResponse = {
|
|
264
225
|
readonly tag: "SqliteCommitOk";
|
|
265
226
|
readonly val: SqliteCommitOk;
|
|
266
|
-
} | {
|
|
267
|
-
readonly tag: "SqliteFenceMismatch";
|
|
268
|
-
readonly val: SqliteFenceMismatch;
|
|
269
|
-
} | {
|
|
270
|
-
readonly tag: "SqliteCommitTooLarge";
|
|
271
|
-
readonly val: SqliteCommitTooLarge;
|
|
272
227
|
} | {
|
|
273
228
|
readonly tag: "SqliteErrorResponse";
|
|
274
229
|
readonly val: SqliteErrorResponse;
|
|
275
230
|
};
|
|
276
231
|
declare function readSqliteCommitResponse(bc: bare.ByteCursor): SqliteCommitResponse;
|
|
277
232
|
declare function writeSqliteCommitResponse(bc: bare.ByteCursor, x: SqliteCommitResponse): void;
|
|
278
|
-
type SqliteCommitStageBeginRequest = {
|
|
279
|
-
readonly actorId: Id;
|
|
280
|
-
readonly generation: SqliteGeneration;
|
|
281
|
-
};
|
|
282
|
-
declare function readSqliteCommitStageBeginRequest(bc: bare.ByteCursor): SqliteCommitStageBeginRequest;
|
|
283
|
-
declare function writeSqliteCommitStageBeginRequest(bc: bare.ByteCursor, x: SqliteCommitStageBeginRequest): void;
|
|
284
|
-
type SqliteCommitStageBeginOk = {
|
|
285
|
-
readonly txid: SqliteTxid;
|
|
286
|
-
};
|
|
287
|
-
declare function readSqliteCommitStageBeginOk(bc: bare.ByteCursor): SqliteCommitStageBeginOk;
|
|
288
|
-
declare function writeSqliteCommitStageBeginOk(bc: bare.ByteCursor, x: SqliteCommitStageBeginOk): void;
|
|
289
|
-
type SqliteCommitStageBeginResponse = {
|
|
290
|
-
readonly tag: "SqliteCommitStageBeginOk";
|
|
291
|
-
readonly val: SqliteCommitStageBeginOk;
|
|
292
|
-
} | {
|
|
293
|
-
readonly tag: "SqliteFenceMismatch";
|
|
294
|
-
readonly val: SqliteFenceMismatch;
|
|
295
|
-
} | {
|
|
296
|
-
readonly tag: "SqliteErrorResponse";
|
|
297
|
-
readonly val: SqliteErrorResponse;
|
|
298
|
-
};
|
|
299
|
-
declare function readSqliteCommitStageBeginResponse(bc: bare.ByteCursor): SqliteCommitStageBeginResponse;
|
|
300
|
-
declare function writeSqliteCommitStageBeginResponse(bc: bare.ByteCursor, x: SqliteCommitStageBeginResponse): void;
|
|
301
|
-
type SqliteCommitStageRequest = {
|
|
302
|
-
readonly actorId: Id;
|
|
303
|
-
readonly generation: SqliteGeneration;
|
|
304
|
-
readonly txid: SqliteTxid;
|
|
305
|
-
readonly chunkIdx: u32;
|
|
306
|
-
readonly bytes: ArrayBuffer;
|
|
307
|
-
readonly isLast: boolean;
|
|
308
|
-
};
|
|
309
|
-
declare function readSqliteCommitStageRequest(bc: bare.ByteCursor): SqliteCommitStageRequest;
|
|
310
|
-
declare function writeSqliteCommitStageRequest(bc: bare.ByteCursor, x: SqliteCommitStageRequest): void;
|
|
311
|
-
type SqliteCommitStageOk = {
|
|
312
|
-
readonly chunkIdxCommitted: u32;
|
|
313
|
-
};
|
|
314
|
-
declare function readSqliteCommitStageOk(bc: bare.ByteCursor): SqliteCommitStageOk;
|
|
315
|
-
declare function writeSqliteCommitStageOk(bc: bare.ByteCursor, x: SqliteCommitStageOk): void;
|
|
316
|
-
type SqliteCommitStageResponse = {
|
|
317
|
-
readonly tag: "SqliteCommitStageOk";
|
|
318
|
-
readonly val: SqliteCommitStageOk;
|
|
319
|
-
} | {
|
|
320
|
-
readonly tag: "SqliteFenceMismatch";
|
|
321
|
-
readonly val: SqliteFenceMismatch;
|
|
322
|
-
} | {
|
|
323
|
-
readonly tag: "SqliteErrorResponse";
|
|
324
|
-
readonly val: SqliteErrorResponse;
|
|
325
|
-
};
|
|
326
|
-
declare function readSqliteCommitStageResponse(bc: bare.ByteCursor): SqliteCommitStageResponse;
|
|
327
|
-
declare function writeSqliteCommitStageResponse(bc: bare.ByteCursor, x: SqliteCommitStageResponse): void;
|
|
328
|
-
type SqliteCommitFinalizeRequest = {
|
|
329
|
-
readonly actorId: Id;
|
|
330
|
-
readonly generation: SqliteGeneration;
|
|
331
|
-
readonly expectedHeadTxid: SqliteTxid;
|
|
332
|
-
readonly txid: SqliteTxid;
|
|
333
|
-
readonly newDbSizePages: u32;
|
|
334
|
-
};
|
|
335
|
-
declare function readSqliteCommitFinalizeRequest(bc: bare.ByteCursor): SqliteCommitFinalizeRequest;
|
|
336
|
-
declare function writeSqliteCommitFinalizeRequest(bc: bare.ByteCursor, x: SqliteCommitFinalizeRequest): void;
|
|
337
|
-
type SqliteCommitFinalizeOk = {
|
|
338
|
-
readonly newHeadTxid: SqliteTxid;
|
|
339
|
-
readonly meta: SqliteMeta;
|
|
340
|
-
};
|
|
341
|
-
declare function readSqliteCommitFinalizeOk(bc: bare.ByteCursor): SqliteCommitFinalizeOk;
|
|
342
|
-
declare function writeSqliteCommitFinalizeOk(bc: bare.ByteCursor, x: SqliteCommitFinalizeOk): void;
|
|
343
|
-
type SqliteStageNotFound = {
|
|
344
|
-
readonly stageId: SqliteStageId;
|
|
345
|
-
};
|
|
346
|
-
declare function readSqliteStageNotFound(bc: bare.ByteCursor): SqliteStageNotFound;
|
|
347
|
-
declare function writeSqliteStageNotFound(bc: bare.ByteCursor, x: SqliteStageNotFound): void;
|
|
348
|
-
type SqliteCommitFinalizeResponse = {
|
|
349
|
-
readonly tag: "SqliteCommitFinalizeOk";
|
|
350
|
-
readonly val: SqliteCommitFinalizeOk;
|
|
351
|
-
} | {
|
|
352
|
-
readonly tag: "SqliteFenceMismatch";
|
|
353
|
-
readonly val: SqliteFenceMismatch;
|
|
354
|
-
} | {
|
|
355
|
-
readonly tag: "SqliteStageNotFound";
|
|
356
|
-
readonly val: SqliteStageNotFound;
|
|
357
|
-
} | {
|
|
358
|
-
readonly tag: "SqliteErrorResponse";
|
|
359
|
-
readonly val: SqliteErrorResponse;
|
|
360
|
-
};
|
|
361
|
-
declare function readSqliteCommitFinalizeResponse(bc: bare.ByteCursor): SqliteCommitFinalizeResponse;
|
|
362
|
-
declare function writeSqliteCommitFinalizeResponse(bc: bare.ByteCursor, x: SqliteCommitFinalizeResponse): void;
|
|
363
|
-
type SqliteStartupData = {
|
|
364
|
-
readonly generation: SqliteGeneration;
|
|
365
|
-
readonly meta: SqliteMeta;
|
|
366
|
-
readonly preloadedPages: readonly SqliteFetchedPage[];
|
|
367
|
-
};
|
|
368
|
-
declare function readSqliteStartupData(bc: bare.ByteCursor): SqliteStartupData;
|
|
369
|
-
declare function writeSqliteStartupData(bc: bare.ByteCursor, x: SqliteStartupData): void;
|
|
370
233
|
/**
|
|
371
234
|
* Core
|
|
372
235
|
*/
|
|
@@ -489,7 +352,6 @@ type CommandStartActor = {
|
|
|
489
352
|
readonly config: ActorConfig;
|
|
490
353
|
readonly hibernatingRequests: readonly HibernatingRequest[];
|
|
491
354
|
readonly preloadedKv: PreloadedKv | null;
|
|
492
|
-
readonly sqliteStartupData: SqliteStartupData | null;
|
|
493
355
|
};
|
|
494
356
|
declare function readCommandStartActor(bc: bare.ByteCursor): CommandStartActor;
|
|
495
357
|
declare function writeCommandStartActor(bc: bare.ByteCursor, x: CommandStartActor): void;
|
|
@@ -758,24 +620,6 @@ type ToRivetSqliteCommitRequest = {
|
|
|
758
620
|
};
|
|
759
621
|
declare function readToRivetSqliteCommitRequest(bc: bare.ByteCursor): ToRivetSqliteCommitRequest;
|
|
760
622
|
declare function writeToRivetSqliteCommitRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitRequest): void;
|
|
761
|
-
type ToRivetSqliteCommitStageBeginRequest = {
|
|
762
|
-
readonly requestId: u32;
|
|
763
|
-
readonly data: SqliteCommitStageBeginRequest;
|
|
764
|
-
};
|
|
765
|
-
declare function readToRivetSqliteCommitStageBeginRequest(bc: bare.ByteCursor): ToRivetSqliteCommitStageBeginRequest;
|
|
766
|
-
declare function writeToRivetSqliteCommitStageBeginRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitStageBeginRequest): void;
|
|
767
|
-
type ToRivetSqliteCommitStageRequest = {
|
|
768
|
-
readonly requestId: u32;
|
|
769
|
-
readonly data: SqliteCommitStageRequest;
|
|
770
|
-
};
|
|
771
|
-
declare function readToRivetSqliteCommitStageRequest(bc: bare.ByteCursor): ToRivetSqliteCommitStageRequest;
|
|
772
|
-
declare function writeToRivetSqliteCommitStageRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitStageRequest): void;
|
|
773
|
-
type ToRivetSqliteCommitFinalizeRequest = {
|
|
774
|
-
readonly requestId: u32;
|
|
775
|
-
readonly data: SqliteCommitFinalizeRequest;
|
|
776
|
-
};
|
|
777
|
-
declare function readToRivetSqliteCommitFinalizeRequest(bc: bare.ByteCursor): ToRivetSqliteCommitFinalizeRequest;
|
|
778
|
-
declare function writeToRivetSqliteCommitFinalizeRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitFinalizeRequest): void;
|
|
779
623
|
type ToRivet = {
|
|
780
624
|
readonly tag: "ToRivetMetadata";
|
|
781
625
|
readonly val: ToRivetMetadata;
|
|
@@ -803,15 +647,6 @@ type ToRivet = {
|
|
|
803
647
|
} | {
|
|
804
648
|
readonly tag: "ToRivetSqliteCommitRequest";
|
|
805
649
|
readonly val: ToRivetSqliteCommitRequest;
|
|
806
|
-
} | {
|
|
807
|
-
readonly tag: "ToRivetSqliteCommitStageBeginRequest";
|
|
808
|
-
readonly val: ToRivetSqliteCommitStageBeginRequest;
|
|
809
|
-
} | {
|
|
810
|
-
readonly tag: "ToRivetSqliteCommitStageRequest";
|
|
811
|
-
readonly val: ToRivetSqliteCommitStageRequest;
|
|
812
|
-
} | {
|
|
813
|
-
readonly tag: "ToRivetSqliteCommitFinalizeRequest";
|
|
814
|
-
readonly val: ToRivetSqliteCommitFinalizeRequest;
|
|
815
650
|
};
|
|
816
651
|
declare function readToRivet(bc: bare.ByteCursor): ToRivet;
|
|
817
652
|
declare function writeToRivet(bc: bare.ByteCursor, x: ToRivet): void;
|
|
@@ -858,24 +693,6 @@ type ToEnvoySqliteCommitResponse = {
|
|
|
858
693
|
};
|
|
859
694
|
declare function readToEnvoySqliteCommitResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitResponse;
|
|
860
695
|
declare function writeToEnvoySqliteCommitResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitResponse): void;
|
|
861
|
-
type ToEnvoySqliteCommitStageBeginResponse = {
|
|
862
|
-
readonly requestId: u32;
|
|
863
|
-
readonly data: SqliteCommitStageBeginResponse;
|
|
864
|
-
};
|
|
865
|
-
declare function readToEnvoySqliteCommitStageBeginResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitStageBeginResponse;
|
|
866
|
-
declare function writeToEnvoySqliteCommitStageBeginResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitStageBeginResponse): void;
|
|
867
|
-
type ToEnvoySqliteCommitStageResponse = {
|
|
868
|
-
readonly requestId: u32;
|
|
869
|
-
readonly data: SqliteCommitStageResponse;
|
|
870
|
-
};
|
|
871
|
-
declare function readToEnvoySqliteCommitStageResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitStageResponse;
|
|
872
|
-
declare function writeToEnvoySqliteCommitStageResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitStageResponse): void;
|
|
873
|
-
type ToEnvoySqliteCommitFinalizeResponse = {
|
|
874
|
-
readonly requestId: u32;
|
|
875
|
-
readonly data: SqliteCommitFinalizeResponse;
|
|
876
|
-
};
|
|
877
|
-
declare function readToEnvoySqliteCommitFinalizeResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitFinalizeResponse;
|
|
878
|
-
declare function writeToEnvoySqliteCommitFinalizeResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitFinalizeResponse): void;
|
|
879
696
|
type ToEnvoy = {
|
|
880
697
|
readonly tag: "ToEnvoyInit";
|
|
881
698
|
readonly val: ToEnvoyInit;
|
|
@@ -900,15 +717,6 @@ type ToEnvoy = {
|
|
|
900
717
|
} | {
|
|
901
718
|
readonly tag: "ToEnvoySqliteCommitResponse";
|
|
902
719
|
readonly val: ToEnvoySqliteCommitResponse;
|
|
903
|
-
} | {
|
|
904
|
-
readonly tag: "ToEnvoySqliteCommitStageBeginResponse";
|
|
905
|
-
readonly val: ToEnvoySqliteCommitStageBeginResponse;
|
|
906
|
-
} | {
|
|
907
|
-
readonly tag: "ToEnvoySqliteCommitStageResponse";
|
|
908
|
-
readonly val: ToEnvoySqliteCommitStageResponse;
|
|
909
|
-
} | {
|
|
910
|
-
readonly tag: "ToEnvoySqliteCommitFinalizeResponse";
|
|
911
|
-
readonly val: ToEnvoySqliteCommitFinalizeResponse;
|
|
912
720
|
};
|
|
913
721
|
declare function readToEnvoy(bc: bare.ByteCursor): ToEnvoy;
|
|
914
722
|
declare function writeToEnvoy(bc: bare.ByteCursor, x: ToEnvoy): void;
|
|
@@ -984,6 +792,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
|
|
|
984
792
|
declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
|
|
985
793
|
declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
|
|
986
794
|
declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
|
|
987
|
-
declare const VERSION =
|
|
795
|
+
declare const VERSION = 3;
|
|
988
796
|
|
|
989
|
-
export { type ActorCheckpoint, type ActorCommandKeyData, type ActorConfig, type ActorIntent, type ActorIntentSleep, type ActorIntentStop, type ActorName, type ActorState, type ActorStateRunning, type ActorStateStopped, type Command, type CommandStartActor, type CommandStopActor, type CommandWrapper, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type GatewayId, type HibernatingRequest, type Id, type Json, type KvDeleteRangeRequest, type KvDeleteRequest, type KvDeleteResponse, type KvDropRequest, type KvDropResponse, type KvErrorResponse, type KvGetRequest, type KvGetResponse, type KvKey, type KvListAllQuery, type KvListPrefixQuery, type KvListQuery, type KvListRangeQuery, type KvListRequest, type KvListResponse, type KvMetadata, type KvPutRequest, type KvPutResponse, type KvRequestData, type KvResponseData, type KvValue, type MessageId, type MessageIndex, type PreloadedKv, type PreloadedKvEntry, type ProtocolMetadata, type RequestId, type
|
|
797
|
+
export { type ActorCheckpoint, type ActorCommandKeyData, type ActorConfig, type ActorIntent, type ActorIntentSleep, type ActorIntentStop, type ActorName, type ActorState, type ActorStateRunning, type ActorStateStopped, type Command, type CommandStartActor, type CommandStopActor, type CommandWrapper, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type GatewayId, type HibernatingRequest, type Id, type Json, type KvDeleteRangeRequest, type KvDeleteRequest, type KvDeleteResponse, type KvDropRequest, type KvDropResponse, type KvErrorResponse, type KvGetRequest, type KvGetResponse, type KvKey, type KvListAllQuery, type KvListPrefixQuery, type KvListQuery, type KvListRangeQuery, type KvListRequest, type KvListResponse, type KvMetadata, type KvPutRequest, type KvPutResponse, type KvRequestData, type KvResponseData, type KvValue, type MessageId, type MessageIndex, type PreloadedKv, type PreloadedKvEntry, type ProtocolMetadata, type RequestId, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteFetchedPage, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqlitePageBytes, type SqlitePgno, StopActorReason, StopCode, type ToEnvoy, type ToEnvoyAckEvents, type ToEnvoyCommands, type ToEnvoyConn, type ToEnvoyConnClose, type ToEnvoyConnPing, type ToEnvoyInit, type ToEnvoyKvResponse, type ToEnvoyPing, type ToEnvoyRequestAbort, type ToEnvoyRequestChunk, type ToEnvoyRequestStart, type ToEnvoySqliteCommitResponse, type ToEnvoySqliteGetPagesResponse, type ToEnvoyTunnelMessage, type ToEnvoyTunnelMessageKind, type ToEnvoyWebSocketClose, type ToEnvoyWebSocketMessage, type ToEnvoyWebSocketOpen, type ToGateway, type ToGatewayPong, type ToOutbound, type ToOutboundActorStart, type ToRivet, type ToRivetAckCommands, type ToRivetEvents, type ToRivetKvRequest, type ToRivetMetadata, type ToRivetPong, type ToRivetResponseAbort, type ToRivetResponseChunk, type ToRivetResponseStart, type ToRivetSqliteCommitRequest, type ToRivetSqliteGetPagesRequest, type ToRivetStopping, type ToRivetTunnelMessage, type ToRivetTunnelMessageKind, type ToRivetWebSocketClose, type ToRivetWebSocketMessage, type ToRivetWebSocketMessageAck, type ToRivetWebSocketOpen, VERSION, decodeActorCommandKeyData, decodeToEnvoy, decodeToEnvoyConn, decodeToGateway, decodeToOutbound, decodeToRivet, encodeActorCommandKeyData, encodeToEnvoy, encodeToEnvoyConn, encodeToGateway, encodeToOutbound, encodeToRivet, type i64, readActorCheckpoint, readActorCommandKeyData, readActorConfig, readActorIntent, readActorName, readActorState, readActorStateStopped, readCommand, readCommandStartActor, readCommandStopActor, readCommandWrapper, readEvent, readEventActorIntent, readEventActorSetAlarm, readEventActorStateUpdate, readEventWrapper, readGatewayId, readHibernatingRequest, readId, readJson, readKvDeleteRangeRequest, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readMessageIndex, readPreloadedKv, readPreloadedKvEntry, readProtocolMetadata, readRequestId, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteFetchedPage, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqlitePageBytes, readSqlitePgno, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitRequest, readToRivetSqliteGetPagesRequest, readToRivetTunnelMessage, readToRivetTunnelMessageKind, readToRivetWebSocketClose, readToRivetWebSocketMessage, readToRivetWebSocketMessageAck, readToRivetWebSocketOpen, type u16, type u32, type u64, writeActorCheckpoint, writeActorCommandKeyData, writeActorConfig, writeActorIntent, writeActorName, writeActorState, writeActorStateStopped, writeCommand, writeCommandStartActor, writeCommandStopActor, writeCommandWrapper, writeEvent, writeEventActorIntent, writeEventActorSetAlarm, writeEventActorStateUpdate, writeEventWrapper, writeGatewayId, writeHibernatingRequest, writeId, writeJson, writeKvDeleteRangeRequest, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeMessageIndex, writePreloadedKv, writePreloadedKvEntry, writeProtocolMetadata, writeRequestId, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteFetchedPage, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqlitePageBytes, writeSqlitePgno, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
|
package/dist/index.js
CHANGED
|
@@ -366,66 +366,18 @@ function writeKvResponseData(bc, x) {
|
|
|
366
366
|
}
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
function readSqliteGeneration(bc) {
|
|
370
|
-
return bare.readU64(bc);
|
|
371
|
-
}
|
|
372
|
-
function writeSqliteGeneration(bc, x) {
|
|
373
|
-
bare.writeU64(bc, x);
|
|
374
|
-
}
|
|
375
|
-
function readSqliteTxid(bc) {
|
|
376
|
-
return bare.readU64(bc);
|
|
377
|
-
}
|
|
378
|
-
function writeSqliteTxid(bc, x) {
|
|
379
|
-
bare.writeU64(bc, x);
|
|
380
|
-
}
|
|
381
369
|
function readSqlitePgno(bc) {
|
|
382
370
|
return bare.readU32(bc);
|
|
383
371
|
}
|
|
384
372
|
function writeSqlitePgno(bc, x) {
|
|
385
373
|
bare.writeU32(bc, x);
|
|
386
374
|
}
|
|
387
|
-
function readSqliteStageId(bc) {
|
|
388
|
-
return bare.readU64(bc);
|
|
389
|
-
}
|
|
390
|
-
function writeSqliteStageId(bc, x) {
|
|
391
|
-
bare.writeU64(bc, x);
|
|
392
|
-
}
|
|
393
375
|
function readSqlitePageBytes(bc) {
|
|
394
376
|
return bare.readData(bc);
|
|
395
377
|
}
|
|
396
378
|
function writeSqlitePageBytes(bc, x) {
|
|
397
379
|
bare.writeData(bc, x);
|
|
398
380
|
}
|
|
399
|
-
function readSqliteMeta(bc) {
|
|
400
|
-
return {
|
|
401
|
-
generation: readSqliteGeneration(bc),
|
|
402
|
-
headTxid: readSqliteTxid(bc),
|
|
403
|
-
materializedTxid: readSqliteTxid(bc),
|
|
404
|
-
dbSizePages: bare.readU32(bc),
|
|
405
|
-
pageSize: bare.readU32(bc),
|
|
406
|
-
creationTsMs: bare.readI64(bc),
|
|
407
|
-
maxDeltaBytes: bare.readU64(bc)
|
|
408
|
-
};
|
|
409
|
-
}
|
|
410
|
-
function writeSqliteMeta(bc, x) {
|
|
411
|
-
writeSqliteGeneration(bc, x.generation);
|
|
412
|
-
writeSqliteTxid(bc, x.headTxid);
|
|
413
|
-
writeSqliteTxid(bc, x.materializedTxid);
|
|
414
|
-
bare.writeU32(bc, x.dbSizePages);
|
|
415
|
-
bare.writeU32(bc, x.pageSize);
|
|
416
|
-
bare.writeI64(bc, x.creationTsMs);
|
|
417
|
-
bare.writeU64(bc, x.maxDeltaBytes);
|
|
418
|
-
}
|
|
419
|
-
function readSqliteFenceMismatch(bc) {
|
|
420
|
-
return {
|
|
421
|
-
actualMeta: readSqliteMeta(bc),
|
|
422
|
-
reason: bare.readString(bc)
|
|
423
|
-
};
|
|
424
|
-
}
|
|
425
|
-
function writeSqliteFenceMismatch(bc, x) {
|
|
426
|
-
writeSqliteMeta(bc, x.actualMeta);
|
|
427
|
-
bare.writeString(bc, x.reason);
|
|
428
|
-
}
|
|
429
381
|
function readSqliteDirtyPage(bc) {
|
|
430
382
|
return {
|
|
431
383
|
pgno: readSqlitePgno(bc),
|
|
@@ -475,14 +427,16 @@ function write6(bc, x) {
|
|
|
475
427
|
function readSqliteGetPagesRequest(bc) {
|
|
476
428
|
return {
|
|
477
429
|
actorId: readId(bc),
|
|
478
|
-
|
|
479
|
-
|
|
430
|
+
pgnos: read6(bc),
|
|
431
|
+
expectedGeneration: read2(bc),
|
|
432
|
+
expectedHeadTxid: read2(bc)
|
|
480
433
|
};
|
|
481
434
|
}
|
|
482
435
|
function writeSqliteGetPagesRequest(bc, x) {
|
|
483
436
|
writeId(bc, x.actorId);
|
|
484
|
-
writeSqliteGeneration(bc, x.generation);
|
|
485
437
|
write6(bc, x.pgnos);
|
|
438
|
+
write2(bc, x.expectedGeneration);
|
|
439
|
+
write2(bc, x.expectedHeadTxid);
|
|
486
440
|
}
|
|
487
441
|
function read7(bc) {
|
|
488
442
|
const len = bare.readUintSafe(bc);
|
|
@@ -503,13 +457,11 @@ function write7(bc, x) {
|
|
|
503
457
|
}
|
|
504
458
|
function readSqliteGetPagesOk(bc) {
|
|
505
459
|
return {
|
|
506
|
-
pages: read7(bc)
|
|
507
|
-
meta: readSqliteMeta(bc)
|
|
460
|
+
pages: read7(bc)
|
|
508
461
|
};
|
|
509
462
|
}
|
|
510
463
|
function writeSqliteGetPagesOk(bc, x) {
|
|
511
464
|
write7(bc, x.pages);
|
|
512
|
-
writeSqliteMeta(bc, x.meta);
|
|
513
465
|
}
|
|
514
466
|
function readSqliteErrorResponse(bc) {
|
|
515
467
|
return {
|
|
@@ -526,8 +478,6 @@ function readSqliteGetPagesResponse(bc) {
|
|
|
526
478
|
case 0:
|
|
527
479
|
return { tag: "SqliteGetPagesOk", val: readSqliteGetPagesOk(bc) };
|
|
528
480
|
case 1:
|
|
529
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
530
|
-
case 2:
|
|
531
481
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
532
482
|
default: {
|
|
533
483
|
bc.offset = offset;
|
|
@@ -542,13 +492,8 @@ function writeSqliteGetPagesResponse(bc, x) {
|
|
|
542
492
|
writeSqliteGetPagesOk(bc, x.val);
|
|
543
493
|
break;
|
|
544
494
|
}
|
|
545
|
-
case "SqliteFenceMismatch": {
|
|
546
|
-
bare.writeU8(bc, 1);
|
|
547
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
548
|
-
break;
|
|
549
|
-
}
|
|
550
495
|
case "SqliteErrorResponse": {
|
|
551
|
-
bare.writeU8(bc,
|
|
496
|
+
bare.writeU8(bc, 1);
|
|
552
497
|
writeSqliteErrorResponse(bc, x.val);
|
|
553
498
|
break;
|
|
554
499
|
}
|
|
@@ -574,50 +519,28 @@ function write8(bc, x) {
|
|
|
574
519
|
function readSqliteCommitRequest(bc) {
|
|
575
520
|
return {
|
|
576
521
|
actorId: readId(bc),
|
|
577
|
-
generation: readSqliteGeneration(bc),
|
|
578
|
-
expectedHeadTxid: readSqliteTxid(bc),
|
|
579
522
|
dirtyPages: read8(bc),
|
|
580
|
-
|
|
523
|
+
dbSizePages: bare.readU32(bc),
|
|
524
|
+
nowMs: bare.readI64(bc),
|
|
525
|
+
expectedGeneration: read2(bc),
|
|
526
|
+
expectedHeadTxid: read2(bc)
|
|
581
527
|
};
|
|
582
528
|
}
|
|
583
529
|
function writeSqliteCommitRequest(bc, x) {
|
|
584
530
|
writeId(bc, x.actorId);
|
|
585
|
-
writeSqliteGeneration(bc, x.generation);
|
|
586
|
-
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
587
531
|
write8(bc, x.dirtyPages);
|
|
588
|
-
bare.writeU32(bc, x.
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
newHeadTxid: readSqliteTxid(bc),
|
|
593
|
-
meta: readSqliteMeta(bc)
|
|
594
|
-
};
|
|
595
|
-
}
|
|
596
|
-
function writeSqliteCommitOk(bc, x) {
|
|
597
|
-
writeSqliteTxid(bc, x.newHeadTxid);
|
|
598
|
-
writeSqliteMeta(bc, x.meta);
|
|
599
|
-
}
|
|
600
|
-
function readSqliteCommitTooLarge(bc) {
|
|
601
|
-
return {
|
|
602
|
-
actualSizeBytes: bare.readU64(bc),
|
|
603
|
-
maxSizeBytes: bare.readU64(bc)
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
function writeSqliteCommitTooLarge(bc, x) {
|
|
607
|
-
bare.writeU64(bc, x.actualSizeBytes);
|
|
608
|
-
bare.writeU64(bc, x.maxSizeBytes);
|
|
532
|
+
bare.writeU32(bc, x.dbSizePages);
|
|
533
|
+
bare.writeI64(bc, x.nowMs);
|
|
534
|
+
write2(bc, x.expectedGeneration);
|
|
535
|
+
write2(bc, x.expectedHeadTxid);
|
|
609
536
|
}
|
|
610
537
|
function readSqliteCommitResponse(bc) {
|
|
611
538
|
const offset = bc.offset;
|
|
612
539
|
const tag = bare.readU8(bc);
|
|
613
540
|
switch (tag) {
|
|
614
541
|
case 0:
|
|
615
|
-
return { tag: "SqliteCommitOk", val:
|
|
542
|
+
return { tag: "SqliteCommitOk", val: null };
|
|
616
543
|
case 1:
|
|
617
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
618
|
-
case 2:
|
|
619
|
-
return { tag: "SqliteCommitTooLarge", val: readSqliteCommitTooLarge(bc) };
|
|
620
|
-
case 3:
|
|
621
544
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
622
545
|
default: {
|
|
623
546
|
bc.offset = offset;
|
|
@@ -629,228 +552,15 @@ function writeSqliteCommitResponse(bc, x) {
|
|
|
629
552
|
switch (x.tag) {
|
|
630
553
|
case "SqliteCommitOk": {
|
|
631
554
|
bare.writeU8(bc, 0);
|
|
632
|
-
writeSqliteCommitOk(bc, x.val);
|
|
633
|
-
break;
|
|
634
|
-
}
|
|
635
|
-
case "SqliteFenceMismatch": {
|
|
636
|
-
bare.writeU8(bc, 1);
|
|
637
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
638
|
-
break;
|
|
639
|
-
}
|
|
640
|
-
case "SqliteCommitTooLarge": {
|
|
641
|
-
bare.writeU8(bc, 2);
|
|
642
|
-
writeSqliteCommitTooLarge(bc, x.val);
|
|
643
555
|
break;
|
|
644
556
|
}
|
|
645
557
|
case "SqliteErrorResponse": {
|
|
646
|
-
bare.writeU8(bc, 3);
|
|
647
|
-
writeSqliteErrorResponse(bc, x.val);
|
|
648
|
-
break;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
function readSqliteCommitStageBeginRequest(bc) {
|
|
653
|
-
return {
|
|
654
|
-
actorId: readId(bc),
|
|
655
|
-
generation: readSqliteGeneration(bc)
|
|
656
|
-
};
|
|
657
|
-
}
|
|
658
|
-
function writeSqliteCommitStageBeginRequest(bc, x) {
|
|
659
|
-
writeId(bc, x.actorId);
|
|
660
|
-
writeSqliteGeneration(bc, x.generation);
|
|
661
|
-
}
|
|
662
|
-
function readSqliteCommitStageBeginOk(bc) {
|
|
663
|
-
return {
|
|
664
|
-
txid: readSqliteTxid(bc)
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
function writeSqliteCommitStageBeginOk(bc, x) {
|
|
668
|
-
writeSqliteTxid(bc, x.txid);
|
|
669
|
-
}
|
|
670
|
-
function readSqliteCommitStageBeginResponse(bc) {
|
|
671
|
-
const offset = bc.offset;
|
|
672
|
-
const tag = bare.readU8(bc);
|
|
673
|
-
switch (tag) {
|
|
674
|
-
case 0:
|
|
675
|
-
return { tag: "SqliteCommitStageBeginOk", val: readSqliteCommitStageBeginOk(bc) };
|
|
676
|
-
case 1:
|
|
677
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
678
|
-
case 2:
|
|
679
|
-
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
680
|
-
default: {
|
|
681
|
-
bc.offset = offset;
|
|
682
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
function writeSqliteCommitStageBeginResponse(bc, x) {
|
|
687
|
-
switch (x.tag) {
|
|
688
|
-
case "SqliteCommitStageBeginOk": {
|
|
689
|
-
bare.writeU8(bc, 0);
|
|
690
|
-
writeSqliteCommitStageBeginOk(bc, x.val);
|
|
691
|
-
break;
|
|
692
|
-
}
|
|
693
|
-
case "SqliteFenceMismatch": {
|
|
694
|
-
bare.writeU8(bc, 1);
|
|
695
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
696
|
-
break;
|
|
697
|
-
}
|
|
698
|
-
case "SqliteErrorResponse": {
|
|
699
|
-
bare.writeU8(bc, 2);
|
|
700
|
-
writeSqliteErrorResponse(bc, x.val);
|
|
701
|
-
break;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
}
|
|
705
|
-
function readSqliteCommitStageRequest(bc) {
|
|
706
|
-
return {
|
|
707
|
-
actorId: readId(bc),
|
|
708
|
-
generation: readSqliteGeneration(bc),
|
|
709
|
-
txid: readSqliteTxid(bc),
|
|
710
|
-
chunkIdx: bare.readU32(bc),
|
|
711
|
-
bytes: bare.readData(bc),
|
|
712
|
-
isLast: bare.readBool(bc)
|
|
713
|
-
};
|
|
714
|
-
}
|
|
715
|
-
function writeSqliteCommitStageRequest(bc, x) {
|
|
716
|
-
writeId(bc, x.actorId);
|
|
717
|
-
writeSqliteGeneration(bc, x.generation);
|
|
718
|
-
writeSqliteTxid(bc, x.txid);
|
|
719
|
-
bare.writeU32(bc, x.chunkIdx);
|
|
720
|
-
bare.writeData(bc, x.bytes);
|
|
721
|
-
bare.writeBool(bc, x.isLast);
|
|
722
|
-
}
|
|
723
|
-
function readSqliteCommitStageOk(bc) {
|
|
724
|
-
return {
|
|
725
|
-
chunkIdxCommitted: bare.readU32(bc)
|
|
726
|
-
};
|
|
727
|
-
}
|
|
728
|
-
function writeSqliteCommitStageOk(bc, x) {
|
|
729
|
-
bare.writeU32(bc, x.chunkIdxCommitted);
|
|
730
|
-
}
|
|
731
|
-
function readSqliteCommitStageResponse(bc) {
|
|
732
|
-
const offset = bc.offset;
|
|
733
|
-
const tag = bare.readU8(bc);
|
|
734
|
-
switch (tag) {
|
|
735
|
-
case 0:
|
|
736
|
-
return { tag: "SqliteCommitStageOk", val: readSqliteCommitStageOk(bc) };
|
|
737
|
-
case 1:
|
|
738
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
739
|
-
case 2:
|
|
740
|
-
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
741
|
-
default: {
|
|
742
|
-
bc.offset = offset;
|
|
743
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
function writeSqliteCommitStageResponse(bc, x) {
|
|
748
|
-
switch (x.tag) {
|
|
749
|
-
case "SqliteCommitStageOk": {
|
|
750
|
-
bare.writeU8(bc, 0);
|
|
751
|
-
writeSqliteCommitStageOk(bc, x.val);
|
|
752
|
-
break;
|
|
753
|
-
}
|
|
754
|
-
case "SqliteFenceMismatch": {
|
|
755
|
-
bare.writeU8(bc, 1);
|
|
756
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
757
|
-
break;
|
|
758
|
-
}
|
|
759
|
-
case "SqliteErrorResponse": {
|
|
760
|
-
bare.writeU8(bc, 2);
|
|
761
|
-
writeSqliteErrorResponse(bc, x.val);
|
|
762
|
-
break;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
766
|
-
function readSqliteCommitFinalizeRequest(bc) {
|
|
767
|
-
return {
|
|
768
|
-
actorId: readId(bc),
|
|
769
|
-
generation: readSqliteGeneration(bc),
|
|
770
|
-
expectedHeadTxid: readSqliteTxid(bc),
|
|
771
|
-
txid: readSqliteTxid(bc),
|
|
772
|
-
newDbSizePages: bare.readU32(bc)
|
|
773
|
-
};
|
|
774
|
-
}
|
|
775
|
-
function writeSqliteCommitFinalizeRequest(bc, x) {
|
|
776
|
-
writeId(bc, x.actorId);
|
|
777
|
-
writeSqliteGeneration(bc, x.generation);
|
|
778
|
-
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
779
|
-
writeSqliteTxid(bc, x.txid);
|
|
780
|
-
bare.writeU32(bc, x.newDbSizePages);
|
|
781
|
-
}
|
|
782
|
-
function readSqliteCommitFinalizeOk(bc) {
|
|
783
|
-
return {
|
|
784
|
-
newHeadTxid: readSqliteTxid(bc),
|
|
785
|
-
meta: readSqliteMeta(bc)
|
|
786
|
-
};
|
|
787
|
-
}
|
|
788
|
-
function writeSqliteCommitFinalizeOk(bc, x) {
|
|
789
|
-
writeSqliteTxid(bc, x.newHeadTxid);
|
|
790
|
-
writeSqliteMeta(bc, x.meta);
|
|
791
|
-
}
|
|
792
|
-
function readSqliteStageNotFound(bc) {
|
|
793
|
-
return {
|
|
794
|
-
stageId: readSqliteStageId(bc)
|
|
795
|
-
};
|
|
796
|
-
}
|
|
797
|
-
function writeSqliteStageNotFound(bc, x) {
|
|
798
|
-
writeSqliteStageId(bc, x.stageId);
|
|
799
|
-
}
|
|
800
|
-
function readSqliteCommitFinalizeResponse(bc) {
|
|
801
|
-
const offset = bc.offset;
|
|
802
|
-
const tag = bare.readU8(bc);
|
|
803
|
-
switch (tag) {
|
|
804
|
-
case 0:
|
|
805
|
-
return { tag: "SqliteCommitFinalizeOk", val: readSqliteCommitFinalizeOk(bc) };
|
|
806
|
-
case 1:
|
|
807
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
808
|
-
case 2:
|
|
809
|
-
return { tag: "SqliteStageNotFound", val: readSqliteStageNotFound(bc) };
|
|
810
|
-
case 3:
|
|
811
|
-
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
812
|
-
default: {
|
|
813
|
-
bc.offset = offset;
|
|
814
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
function writeSqliteCommitFinalizeResponse(bc, x) {
|
|
819
|
-
switch (x.tag) {
|
|
820
|
-
case "SqliteCommitFinalizeOk": {
|
|
821
|
-
bare.writeU8(bc, 0);
|
|
822
|
-
writeSqliteCommitFinalizeOk(bc, x.val);
|
|
823
|
-
break;
|
|
824
|
-
}
|
|
825
|
-
case "SqliteFenceMismatch": {
|
|
826
558
|
bare.writeU8(bc, 1);
|
|
827
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
828
|
-
break;
|
|
829
|
-
}
|
|
830
|
-
case "SqliteStageNotFound": {
|
|
831
|
-
bare.writeU8(bc, 2);
|
|
832
|
-
writeSqliteStageNotFound(bc, x.val);
|
|
833
|
-
break;
|
|
834
|
-
}
|
|
835
|
-
case "SqliteErrorResponse": {
|
|
836
|
-
bare.writeU8(bc, 3);
|
|
837
559
|
writeSqliteErrorResponse(bc, x.val);
|
|
838
560
|
break;
|
|
839
561
|
}
|
|
840
562
|
}
|
|
841
563
|
}
|
|
842
|
-
function readSqliteStartupData(bc) {
|
|
843
|
-
return {
|
|
844
|
-
generation: readSqliteGeneration(bc),
|
|
845
|
-
meta: readSqliteMeta(bc),
|
|
846
|
-
preloadedPages: read7(bc)
|
|
847
|
-
};
|
|
848
|
-
}
|
|
849
|
-
function writeSqliteStartupData(bc, x) {
|
|
850
|
-
writeSqliteGeneration(bc, x.generation);
|
|
851
|
-
writeSqliteMeta(bc, x.meta);
|
|
852
|
-
write7(bc, x.preloadedPages);
|
|
853
|
-
}
|
|
854
564
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
855
565
|
StopCode2["Ok"] = "Ok";
|
|
856
566
|
StopCode2["Error"] = "Error";
|
|
@@ -1152,28 +862,17 @@ function write14(bc, x) {
|
|
|
1152
862
|
writePreloadedKv(bc, x);
|
|
1153
863
|
}
|
|
1154
864
|
}
|
|
1155
|
-
function read15(bc) {
|
|
1156
|
-
return bare.readBool(bc) ? readSqliteStartupData(bc) : null;
|
|
1157
|
-
}
|
|
1158
|
-
function write15(bc, x) {
|
|
1159
|
-
bare.writeBool(bc, x != null);
|
|
1160
|
-
if (x != null) {
|
|
1161
|
-
writeSqliteStartupData(bc, x);
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
865
|
function readCommandStartActor(bc) {
|
|
1165
866
|
return {
|
|
1166
867
|
config: readActorConfig(bc),
|
|
1167
868
|
hibernatingRequests: read13(bc),
|
|
1168
|
-
preloadedKv: read14(bc)
|
|
1169
|
-
sqliteStartupData: read15(bc)
|
|
869
|
+
preloadedKv: read14(bc)
|
|
1170
870
|
};
|
|
1171
871
|
}
|
|
1172
872
|
function writeCommandStartActor(bc, x) {
|
|
1173
873
|
writeActorConfig(bc, x.config);
|
|
1174
874
|
write13(bc, x.hibernatingRequests);
|
|
1175
875
|
write14(bc, x.preloadedKv);
|
|
1176
|
-
write15(bc, x.sqliteStartupData);
|
|
1177
876
|
}
|
|
1178
877
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
1179
878
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -1330,7 +1029,7 @@ function writeMessageId(bc, x) {
|
|
|
1330
1029
|
writeRequestId(bc, x.requestId);
|
|
1331
1030
|
writeMessageIndex(bc, x.messageIndex);
|
|
1332
1031
|
}
|
|
1333
|
-
function
|
|
1032
|
+
function read15(bc) {
|
|
1334
1033
|
const len = bare.readUintSafe(bc);
|
|
1335
1034
|
const result = /* @__PURE__ */ new Map();
|
|
1336
1035
|
for (let i = 0; i < len; i++) {
|
|
@@ -1344,7 +1043,7 @@ function read16(bc) {
|
|
|
1344
1043
|
}
|
|
1345
1044
|
return result;
|
|
1346
1045
|
}
|
|
1347
|
-
function
|
|
1046
|
+
function write15(bc, x) {
|
|
1348
1047
|
bare.writeUintSafe(bc, x.size);
|
|
1349
1048
|
for (const kv of x) {
|
|
1350
1049
|
bare.writeString(bc, kv[0]);
|
|
@@ -1356,7 +1055,7 @@ function readToEnvoyRequestStart(bc) {
|
|
|
1356
1055
|
actorId: readId(bc),
|
|
1357
1056
|
method: bare.readString(bc),
|
|
1358
1057
|
path: bare.readString(bc),
|
|
1359
|
-
headers:
|
|
1058
|
+
headers: read15(bc),
|
|
1360
1059
|
body: read10(bc),
|
|
1361
1060
|
stream: bare.readBool(bc)
|
|
1362
1061
|
};
|
|
@@ -1365,7 +1064,7 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
1365
1064
|
writeId(bc, x.actorId);
|
|
1366
1065
|
bare.writeString(bc, x.method);
|
|
1367
1066
|
bare.writeString(bc, x.path);
|
|
1368
|
-
|
|
1067
|
+
write15(bc, x.headers);
|
|
1369
1068
|
write10(bc, x.body);
|
|
1370
1069
|
bare.writeBool(bc, x.stream);
|
|
1371
1070
|
}
|
|
@@ -1382,14 +1081,14 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
1382
1081
|
function readToRivetResponseStart(bc) {
|
|
1383
1082
|
return {
|
|
1384
1083
|
status: bare.readU16(bc),
|
|
1385
|
-
headers:
|
|
1084
|
+
headers: read15(bc),
|
|
1386
1085
|
body: read10(bc),
|
|
1387
1086
|
stream: bare.readBool(bc)
|
|
1388
1087
|
};
|
|
1389
1088
|
}
|
|
1390
1089
|
function writeToRivetResponseStart(bc, x) {
|
|
1391
1090
|
bare.writeU16(bc, x.status);
|
|
1392
|
-
|
|
1091
|
+
write15(bc, x.headers);
|
|
1393
1092
|
write10(bc, x.body);
|
|
1394
1093
|
bare.writeBool(bc, x.stream);
|
|
1395
1094
|
}
|
|
@@ -1407,13 +1106,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
1407
1106
|
return {
|
|
1408
1107
|
actorId: readId(bc),
|
|
1409
1108
|
path: bare.readString(bc),
|
|
1410
|
-
headers:
|
|
1109
|
+
headers: read15(bc)
|
|
1411
1110
|
};
|
|
1412
1111
|
}
|
|
1413
1112
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
1414
1113
|
writeId(bc, x.actorId);
|
|
1415
1114
|
bare.writeString(bc, x.path);
|
|
1416
|
-
|
|
1115
|
+
write15(bc, x.headers);
|
|
1417
1116
|
}
|
|
1418
1117
|
function readToEnvoyWebSocketMessage(bc) {
|
|
1419
1118
|
return {
|
|
@@ -1425,10 +1124,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
1425
1124
|
bare.writeData(bc, x.data);
|
|
1426
1125
|
bare.writeBool(bc, x.binary);
|
|
1427
1126
|
}
|
|
1428
|
-
function
|
|
1127
|
+
function read16(bc) {
|
|
1429
1128
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1430
1129
|
}
|
|
1431
|
-
function
|
|
1130
|
+
function write16(bc, x) {
|
|
1432
1131
|
bare.writeBool(bc, x != null);
|
|
1433
1132
|
if (x != null) {
|
|
1434
1133
|
bare.writeU16(bc, x);
|
|
@@ -1436,12 +1135,12 @@ function write17(bc, x) {
|
|
|
1436
1135
|
}
|
|
1437
1136
|
function readToEnvoyWebSocketClose(bc) {
|
|
1438
1137
|
return {
|
|
1439
|
-
code:
|
|
1138
|
+
code: read16(bc),
|
|
1440
1139
|
reason: read9(bc)
|
|
1441
1140
|
};
|
|
1442
1141
|
}
|
|
1443
1142
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
1444
|
-
|
|
1143
|
+
write16(bc, x.code);
|
|
1445
1144
|
write9(bc, x.reason);
|
|
1446
1145
|
}
|
|
1447
1146
|
function readToRivetWebSocketOpen(bc) {
|
|
@@ -1472,13 +1171,13 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
1472
1171
|
}
|
|
1473
1172
|
function readToRivetWebSocketClose(bc) {
|
|
1474
1173
|
return {
|
|
1475
|
-
code:
|
|
1174
|
+
code: read16(bc),
|
|
1476
1175
|
reason: read9(bc),
|
|
1477
1176
|
hibernate: bare.readBool(bc)
|
|
1478
1177
|
};
|
|
1479
1178
|
}
|
|
1480
1179
|
function writeToRivetWebSocketClose(bc, x) {
|
|
1481
|
-
|
|
1180
|
+
write16(bc, x.code);
|
|
1482
1181
|
write9(bc, x.reason);
|
|
1483
1182
|
bare.writeBool(bc, x.hibernate);
|
|
1484
1183
|
}
|
|
@@ -1627,7 +1326,7 @@ function readToEnvoyPing(bc) {
|
|
|
1627
1326
|
function writeToEnvoyPing(bc, x) {
|
|
1628
1327
|
bare.writeI64(bc, x.ts);
|
|
1629
1328
|
}
|
|
1630
|
-
function
|
|
1329
|
+
function read17(bc) {
|
|
1631
1330
|
const len = bare.readUintSafe(bc);
|
|
1632
1331
|
const result = /* @__PURE__ */ new Map();
|
|
1633
1332
|
for (let i = 0; i < len; i++) {
|
|
@@ -1641,26 +1340,26 @@ function read18(bc) {
|
|
|
1641
1340
|
}
|
|
1642
1341
|
return result;
|
|
1643
1342
|
}
|
|
1644
|
-
function
|
|
1343
|
+
function write17(bc, x) {
|
|
1645
1344
|
bare.writeUintSafe(bc, x.size);
|
|
1646
1345
|
for (const kv of x) {
|
|
1647
1346
|
bare.writeString(bc, kv[0]);
|
|
1648
1347
|
writeActorName(bc, kv[1]);
|
|
1649
1348
|
}
|
|
1650
1349
|
}
|
|
1651
|
-
function
|
|
1652
|
-
return bare.readBool(bc) ?
|
|
1350
|
+
function read18(bc) {
|
|
1351
|
+
return bare.readBool(bc) ? read17(bc) : null;
|
|
1653
1352
|
}
|
|
1654
|
-
function
|
|
1353
|
+
function write18(bc, x) {
|
|
1655
1354
|
bare.writeBool(bc, x != null);
|
|
1656
1355
|
if (x != null) {
|
|
1657
|
-
|
|
1356
|
+
write17(bc, x);
|
|
1658
1357
|
}
|
|
1659
1358
|
}
|
|
1660
|
-
function
|
|
1359
|
+
function read19(bc) {
|
|
1661
1360
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1662
1361
|
}
|
|
1663
|
-
function
|
|
1362
|
+
function write19(bc, x) {
|
|
1664
1363
|
bare.writeBool(bc, x != null);
|
|
1665
1364
|
if (x != null) {
|
|
1666
1365
|
writeJson(bc, x);
|
|
@@ -1668,13 +1367,13 @@ function write20(bc, x) {
|
|
|
1668
1367
|
}
|
|
1669
1368
|
function readToRivetMetadata(bc) {
|
|
1670
1369
|
return {
|
|
1671
|
-
prepopulateActorNames:
|
|
1672
|
-
metadata:
|
|
1370
|
+
prepopulateActorNames: read18(bc),
|
|
1371
|
+
metadata: read19(bc)
|
|
1673
1372
|
};
|
|
1674
1373
|
}
|
|
1675
1374
|
function writeToRivetMetadata(bc, x) {
|
|
1676
|
-
|
|
1677
|
-
|
|
1375
|
+
write18(bc, x.prepopulateActorNames);
|
|
1376
|
+
write19(bc, x.metadata);
|
|
1678
1377
|
}
|
|
1679
1378
|
function readToRivetEvents(bc) {
|
|
1680
1379
|
const len = bare.readUintSafe(bc);
|
|
@@ -1693,7 +1392,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1693
1392
|
writeEventWrapper(bc, x[i]);
|
|
1694
1393
|
}
|
|
1695
1394
|
}
|
|
1696
|
-
function
|
|
1395
|
+
function read20(bc) {
|
|
1697
1396
|
const len = bare.readUintSafe(bc);
|
|
1698
1397
|
if (len === 0) {
|
|
1699
1398
|
return [];
|
|
@@ -1704,7 +1403,7 @@ function read21(bc) {
|
|
|
1704
1403
|
}
|
|
1705
1404
|
return result;
|
|
1706
1405
|
}
|
|
1707
|
-
function
|
|
1406
|
+
function write20(bc, x) {
|
|
1708
1407
|
bare.writeUintSafe(bc, x.length);
|
|
1709
1408
|
for (let i = 0; i < x.length; i++) {
|
|
1710
1409
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1712,11 +1411,11 @@ function write21(bc, x) {
|
|
|
1712
1411
|
}
|
|
1713
1412
|
function readToRivetAckCommands(bc) {
|
|
1714
1413
|
return {
|
|
1715
|
-
lastCommandCheckpoints:
|
|
1414
|
+
lastCommandCheckpoints: read20(bc)
|
|
1716
1415
|
};
|
|
1717
1416
|
}
|
|
1718
1417
|
function writeToRivetAckCommands(bc, x) {
|
|
1719
|
-
|
|
1418
|
+
write20(bc, x.lastCommandCheckpoints);
|
|
1720
1419
|
}
|
|
1721
1420
|
function readToRivetPong(bc) {
|
|
1722
1421
|
return {
|
|
@@ -1758,36 +1457,6 @@ function writeToRivetSqliteCommitRequest(bc, x) {
|
|
|
1758
1457
|
bare.writeU32(bc, x.requestId);
|
|
1759
1458
|
writeSqliteCommitRequest(bc, x.data);
|
|
1760
1459
|
}
|
|
1761
|
-
function readToRivetSqliteCommitStageBeginRequest(bc) {
|
|
1762
|
-
return {
|
|
1763
|
-
requestId: bare.readU32(bc),
|
|
1764
|
-
data: readSqliteCommitStageBeginRequest(bc)
|
|
1765
|
-
};
|
|
1766
|
-
}
|
|
1767
|
-
function writeToRivetSqliteCommitStageBeginRequest(bc, x) {
|
|
1768
|
-
bare.writeU32(bc, x.requestId);
|
|
1769
|
-
writeSqliteCommitStageBeginRequest(bc, x.data);
|
|
1770
|
-
}
|
|
1771
|
-
function readToRivetSqliteCommitStageRequest(bc) {
|
|
1772
|
-
return {
|
|
1773
|
-
requestId: bare.readU32(bc),
|
|
1774
|
-
data: readSqliteCommitStageRequest(bc)
|
|
1775
|
-
};
|
|
1776
|
-
}
|
|
1777
|
-
function writeToRivetSqliteCommitStageRequest(bc, x) {
|
|
1778
|
-
bare.writeU32(bc, x.requestId);
|
|
1779
|
-
writeSqliteCommitStageRequest(bc, x.data);
|
|
1780
|
-
}
|
|
1781
|
-
function readToRivetSqliteCommitFinalizeRequest(bc) {
|
|
1782
|
-
return {
|
|
1783
|
-
requestId: bare.readU32(bc),
|
|
1784
|
-
data: readSqliteCommitFinalizeRequest(bc)
|
|
1785
|
-
};
|
|
1786
|
-
}
|
|
1787
|
-
function writeToRivetSqliteCommitFinalizeRequest(bc, x) {
|
|
1788
|
-
bare.writeU32(bc, x.requestId);
|
|
1789
|
-
writeSqliteCommitFinalizeRequest(bc, x.data);
|
|
1790
|
-
}
|
|
1791
1460
|
function readToRivet(bc) {
|
|
1792
1461
|
const offset = bc.offset;
|
|
1793
1462
|
const tag = bare.readU8(bc);
|
|
@@ -1810,12 +1479,6 @@ function readToRivet(bc) {
|
|
|
1810
1479
|
return { tag: "ToRivetSqliteGetPagesRequest", val: readToRivetSqliteGetPagesRequest(bc) };
|
|
1811
1480
|
case 8:
|
|
1812
1481
|
return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
|
|
1813
|
-
case 9:
|
|
1814
|
-
return { tag: "ToRivetSqliteCommitStageBeginRequest", val: readToRivetSqliteCommitStageBeginRequest(bc) };
|
|
1815
|
-
case 10:
|
|
1816
|
-
return { tag: "ToRivetSqliteCommitStageRequest", val: readToRivetSqliteCommitStageRequest(bc) };
|
|
1817
|
-
case 11:
|
|
1818
|
-
return { tag: "ToRivetSqliteCommitFinalizeRequest", val: readToRivetSqliteCommitFinalizeRequest(bc) };
|
|
1819
1482
|
default: {
|
|
1820
1483
|
bc.offset = offset;
|
|
1821
1484
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1868,21 +1531,6 @@ function writeToRivet(bc, x) {
|
|
|
1868
1531
|
writeToRivetSqliteCommitRequest(bc, x.val);
|
|
1869
1532
|
break;
|
|
1870
1533
|
}
|
|
1871
|
-
case "ToRivetSqliteCommitStageBeginRequest": {
|
|
1872
|
-
bare.writeU8(bc, 9);
|
|
1873
|
-
writeToRivetSqliteCommitStageBeginRequest(bc, x.val);
|
|
1874
|
-
break;
|
|
1875
|
-
}
|
|
1876
|
-
case "ToRivetSqliteCommitStageRequest": {
|
|
1877
|
-
bare.writeU8(bc, 10);
|
|
1878
|
-
writeToRivetSqliteCommitStageRequest(bc, x.val);
|
|
1879
|
-
break;
|
|
1880
|
-
}
|
|
1881
|
-
case "ToRivetSqliteCommitFinalizeRequest": {
|
|
1882
|
-
bare.writeU8(bc, 11);
|
|
1883
|
-
writeToRivetSqliteCommitFinalizeRequest(bc, x.val);
|
|
1884
|
-
break;
|
|
1885
|
-
}
|
|
1886
1534
|
}
|
|
1887
1535
|
}
|
|
1888
1536
|
function encodeToRivet(x, config) {
|
|
@@ -1941,11 +1589,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1941
1589
|
}
|
|
1942
1590
|
function readToEnvoyAckEvents(bc) {
|
|
1943
1591
|
return {
|
|
1944
|
-
lastEventCheckpoints:
|
|
1592
|
+
lastEventCheckpoints: read20(bc)
|
|
1945
1593
|
};
|
|
1946
1594
|
}
|
|
1947
1595
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1948
|
-
|
|
1596
|
+
write20(bc, x.lastEventCheckpoints);
|
|
1949
1597
|
}
|
|
1950
1598
|
function readToEnvoyKvResponse(bc) {
|
|
1951
1599
|
return {
|
|
@@ -1977,36 +1625,6 @@ function writeToEnvoySqliteCommitResponse(bc, x) {
|
|
|
1977
1625
|
bare.writeU32(bc, x.requestId);
|
|
1978
1626
|
writeSqliteCommitResponse(bc, x.data);
|
|
1979
1627
|
}
|
|
1980
|
-
function readToEnvoySqliteCommitStageBeginResponse(bc) {
|
|
1981
|
-
return {
|
|
1982
|
-
requestId: bare.readU32(bc),
|
|
1983
|
-
data: readSqliteCommitStageBeginResponse(bc)
|
|
1984
|
-
};
|
|
1985
|
-
}
|
|
1986
|
-
function writeToEnvoySqliteCommitStageBeginResponse(bc, x) {
|
|
1987
|
-
bare.writeU32(bc, x.requestId);
|
|
1988
|
-
writeSqliteCommitStageBeginResponse(bc, x.data);
|
|
1989
|
-
}
|
|
1990
|
-
function readToEnvoySqliteCommitStageResponse(bc) {
|
|
1991
|
-
return {
|
|
1992
|
-
requestId: bare.readU32(bc),
|
|
1993
|
-
data: readSqliteCommitStageResponse(bc)
|
|
1994
|
-
};
|
|
1995
|
-
}
|
|
1996
|
-
function writeToEnvoySqliteCommitStageResponse(bc, x) {
|
|
1997
|
-
bare.writeU32(bc, x.requestId);
|
|
1998
|
-
writeSqliteCommitStageResponse(bc, x.data);
|
|
1999
|
-
}
|
|
2000
|
-
function readToEnvoySqliteCommitFinalizeResponse(bc) {
|
|
2001
|
-
return {
|
|
2002
|
-
requestId: bare.readU32(bc),
|
|
2003
|
-
data: readSqliteCommitFinalizeResponse(bc)
|
|
2004
|
-
};
|
|
2005
|
-
}
|
|
2006
|
-
function writeToEnvoySqliteCommitFinalizeResponse(bc, x) {
|
|
2007
|
-
bare.writeU32(bc, x.requestId);
|
|
2008
|
-
writeSqliteCommitFinalizeResponse(bc, x.data);
|
|
2009
|
-
}
|
|
2010
1628
|
function readToEnvoy(bc) {
|
|
2011
1629
|
const offset = bc.offset;
|
|
2012
1630
|
const tag = bare.readU8(bc);
|
|
@@ -2027,12 +1645,6 @@ function readToEnvoy(bc) {
|
|
|
2027
1645
|
return { tag: "ToEnvoySqliteGetPagesResponse", val: readToEnvoySqliteGetPagesResponse(bc) };
|
|
2028
1646
|
case 7:
|
|
2029
1647
|
return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
|
|
2030
|
-
case 8:
|
|
2031
|
-
return { tag: "ToEnvoySqliteCommitStageBeginResponse", val: readToEnvoySqliteCommitStageBeginResponse(bc) };
|
|
2032
|
-
case 9:
|
|
2033
|
-
return { tag: "ToEnvoySqliteCommitStageResponse", val: readToEnvoySqliteCommitStageResponse(bc) };
|
|
2034
|
-
case 10:
|
|
2035
|
-
return { tag: "ToEnvoySqliteCommitFinalizeResponse", val: readToEnvoySqliteCommitFinalizeResponse(bc) };
|
|
2036
1648
|
default: {
|
|
2037
1649
|
bc.offset = offset;
|
|
2038
1650
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -2081,21 +1693,6 @@ function writeToEnvoy(bc, x) {
|
|
|
2081
1693
|
writeToEnvoySqliteCommitResponse(bc, x.val);
|
|
2082
1694
|
break;
|
|
2083
1695
|
}
|
|
2084
|
-
case "ToEnvoySqliteCommitStageBeginResponse": {
|
|
2085
|
-
bare.writeU8(bc, 8);
|
|
2086
|
-
writeToEnvoySqliteCommitStageBeginResponse(bc, x.val);
|
|
2087
|
-
break;
|
|
2088
|
-
}
|
|
2089
|
-
case "ToEnvoySqliteCommitStageResponse": {
|
|
2090
|
-
bare.writeU8(bc, 9);
|
|
2091
|
-
writeToEnvoySqliteCommitStageResponse(bc, x.val);
|
|
2092
|
-
break;
|
|
2093
|
-
}
|
|
2094
|
-
case "ToEnvoySqliteCommitFinalizeResponse": {
|
|
2095
|
-
bare.writeU8(bc, 10);
|
|
2096
|
-
writeToEnvoySqliteCommitFinalizeResponse(bc, x.val);
|
|
2097
|
-
break;
|
|
2098
|
-
}
|
|
2099
1696
|
}
|
|
2100
1697
|
}
|
|
2101
1698
|
function encodeToEnvoy(x, config) {
|
|
@@ -2302,7 +1899,7 @@ function decodeToOutbound(bytes) {
|
|
|
2302
1899
|
function assert(condition, message) {
|
|
2303
1900
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
2304
1901
|
}
|
|
2305
|
-
var VERSION =
|
|
1902
|
+
var VERSION = 3;
|
|
2306
1903
|
export {
|
|
2307
1904
|
StopActorReason,
|
|
2308
1905
|
StopCode,
|
|
@@ -2361,34 +1958,16 @@ export {
|
|
|
2361
1958
|
readPreloadedKvEntry,
|
|
2362
1959
|
readProtocolMetadata,
|
|
2363
1960
|
readRequestId,
|
|
2364
|
-
readSqliteCommitFinalizeOk,
|
|
2365
|
-
readSqliteCommitFinalizeRequest,
|
|
2366
|
-
readSqliteCommitFinalizeResponse,
|
|
2367
|
-
readSqliteCommitOk,
|
|
2368
1961
|
readSqliteCommitRequest,
|
|
2369
1962
|
readSqliteCommitResponse,
|
|
2370
|
-
readSqliteCommitStageBeginOk,
|
|
2371
|
-
readSqliteCommitStageBeginRequest,
|
|
2372
|
-
readSqliteCommitStageBeginResponse,
|
|
2373
|
-
readSqliteCommitStageOk,
|
|
2374
|
-
readSqliteCommitStageRequest,
|
|
2375
|
-
readSqliteCommitStageResponse,
|
|
2376
|
-
readSqliteCommitTooLarge,
|
|
2377
1963
|
readSqliteDirtyPage,
|
|
2378
1964
|
readSqliteErrorResponse,
|
|
2379
|
-
readSqliteFenceMismatch,
|
|
2380
1965
|
readSqliteFetchedPage,
|
|
2381
|
-
readSqliteGeneration,
|
|
2382
1966
|
readSqliteGetPagesOk,
|
|
2383
1967
|
readSqliteGetPagesRequest,
|
|
2384
1968
|
readSqliteGetPagesResponse,
|
|
2385
|
-
readSqliteMeta,
|
|
2386
1969
|
readSqlitePageBytes,
|
|
2387
1970
|
readSqlitePgno,
|
|
2388
|
-
readSqliteStageId,
|
|
2389
|
-
readSqliteStageNotFound,
|
|
2390
|
-
readSqliteStartupData,
|
|
2391
|
-
readSqliteTxid,
|
|
2392
1971
|
readStopActorReason,
|
|
2393
1972
|
readStopCode,
|
|
2394
1973
|
readToEnvoy,
|
|
@@ -2401,10 +1980,7 @@ export {
|
|
|
2401
1980
|
readToEnvoyPing,
|
|
2402
1981
|
readToEnvoyRequestChunk,
|
|
2403
1982
|
readToEnvoyRequestStart,
|
|
2404
|
-
readToEnvoySqliteCommitFinalizeResponse,
|
|
2405
1983
|
readToEnvoySqliteCommitResponse,
|
|
2406
|
-
readToEnvoySqliteCommitStageBeginResponse,
|
|
2407
|
-
readToEnvoySqliteCommitStageResponse,
|
|
2408
1984
|
readToEnvoySqliteGetPagesResponse,
|
|
2409
1985
|
readToEnvoyTunnelMessage,
|
|
2410
1986
|
readToEnvoyTunnelMessageKind,
|
|
@@ -2423,10 +1999,7 @@ export {
|
|
|
2423
1999
|
readToRivetPong,
|
|
2424
2000
|
readToRivetResponseChunk,
|
|
2425
2001
|
readToRivetResponseStart,
|
|
2426
|
-
readToRivetSqliteCommitFinalizeRequest,
|
|
2427
2002
|
readToRivetSqliteCommitRequest,
|
|
2428
|
-
readToRivetSqliteCommitStageBeginRequest,
|
|
2429
|
-
readToRivetSqliteCommitStageRequest,
|
|
2430
2003
|
readToRivetSqliteGetPagesRequest,
|
|
2431
2004
|
readToRivetTunnelMessage,
|
|
2432
2005
|
readToRivetTunnelMessageKind,
|
|
@@ -2476,34 +2049,16 @@ export {
|
|
|
2476
2049
|
writePreloadedKvEntry,
|
|
2477
2050
|
writeProtocolMetadata,
|
|
2478
2051
|
writeRequestId,
|
|
2479
|
-
writeSqliteCommitFinalizeOk,
|
|
2480
|
-
writeSqliteCommitFinalizeRequest,
|
|
2481
|
-
writeSqliteCommitFinalizeResponse,
|
|
2482
|
-
writeSqliteCommitOk,
|
|
2483
2052
|
writeSqliteCommitRequest,
|
|
2484
2053
|
writeSqliteCommitResponse,
|
|
2485
|
-
writeSqliteCommitStageBeginOk,
|
|
2486
|
-
writeSqliteCommitStageBeginRequest,
|
|
2487
|
-
writeSqliteCommitStageBeginResponse,
|
|
2488
|
-
writeSqliteCommitStageOk,
|
|
2489
|
-
writeSqliteCommitStageRequest,
|
|
2490
|
-
writeSqliteCommitStageResponse,
|
|
2491
|
-
writeSqliteCommitTooLarge,
|
|
2492
2054
|
writeSqliteDirtyPage,
|
|
2493
2055
|
writeSqliteErrorResponse,
|
|
2494
|
-
writeSqliteFenceMismatch,
|
|
2495
2056
|
writeSqliteFetchedPage,
|
|
2496
|
-
writeSqliteGeneration,
|
|
2497
2057
|
writeSqliteGetPagesOk,
|
|
2498
2058
|
writeSqliteGetPagesRequest,
|
|
2499
2059
|
writeSqliteGetPagesResponse,
|
|
2500
|
-
writeSqliteMeta,
|
|
2501
2060
|
writeSqlitePageBytes,
|
|
2502
2061
|
writeSqlitePgno,
|
|
2503
|
-
writeSqliteStageId,
|
|
2504
|
-
writeSqliteStageNotFound,
|
|
2505
|
-
writeSqliteStartupData,
|
|
2506
|
-
writeSqliteTxid,
|
|
2507
2062
|
writeStopActorReason,
|
|
2508
2063
|
writeStopCode,
|
|
2509
2064
|
writeToEnvoy,
|
|
@@ -2516,10 +2071,7 @@ export {
|
|
|
2516
2071
|
writeToEnvoyPing,
|
|
2517
2072
|
writeToEnvoyRequestChunk,
|
|
2518
2073
|
writeToEnvoyRequestStart,
|
|
2519
|
-
writeToEnvoySqliteCommitFinalizeResponse,
|
|
2520
2074
|
writeToEnvoySqliteCommitResponse,
|
|
2521
|
-
writeToEnvoySqliteCommitStageBeginResponse,
|
|
2522
|
-
writeToEnvoySqliteCommitStageResponse,
|
|
2523
2075
|
writeToEnvoySqliteGetPagesResponse,
|
|
2524
2076
|
writeToEnvoyTunnelMessage,
|
|
2525
2077
|
writeToEnvoyTunnelMessageKind,
|
|
@@ -2538,10 +2090,7 @@ export {
|
|
|
2538
2090
|
writeToRivetPong,
|
|
2539
2091
|
writeToRivetResponseChunk,
|
|
2540
2092
|
writeToRivetResponseStart,
|
|
2541
|
-
writeToRivetSqliteCommitFinalizeRequest,
|
|
2542
2093
|
writeToRivetSqliteCommitRequest,
|
|
2543
|
-
writeToRivetSqliteCommitStageBeginRequest,
|
|
2544
|
-
writeToRivetSqliteCommitStageRequest,
|
|
2545
2094
|
writeToRivetSqliteGetPagesRequest,
|
|
2546
2095
|
writeToRivetTunnelMessage,
|
|
2547
2096
|
writeToRivetTunnelMessageKind,
|