@rivetkit/engine-envoy-protocol 0.0.0-pr.4673.d7d209b → 0.0.0-pr.4674.b6084cc
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 +2 -239
- package/dist/index.js +67 -678
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -165,169 +165,6 @@ 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
|
-
type SqlitePgno = u32;
|
|
175
|
-
declare function readSqlitePgno(bc: bare.ByteCursor): SqlitePgno;
|
|
176
|
-
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
|
-
type SqlitePageBytes = ArrayBuffer;
|
|
181
|
-
declare function readSqlitePageBytes(bc: bare.ByteCursor): SqlitePageBytes;
|
|
182
|
-
declare function writeSqlitePageBytes(bc: bare.ByteCursor, x: SqlitePageBytes): void;
|
|
183
|
-
type SqliteMeta = {
|
|
184
|
-
readonly schemaVersion: u32;
|
|
185
|
-
readonly generation: SqliteGeneration;
|
|
186
|
-
readonly headTxid: SqliteTxid;
|
|
187
|
-
readonly materializedTxid: SqliteTxid;
|
|
188
|
-
readonly dbSizePages: u32;
|
|
189
|
-
readonly pageSize: u32;
|
|
190
|
-
readonly creationTsMs: i64;
|
|
191
|
-
readonly maxDeltaBytes: u64;
|
|
192
|
-
};
|
|
193
|
-
declare function readSqliteMeta(bc: bare.ByteCursor): SqliteMeta;
|
|
194
|
-
declare function writeSqliteMeta(bc: bare.ByteCursor, x: SqliteMeta): void;
|
|
195
|
-
type SqliteFenceMismatch = {
|
|
196
|
-
readonly actualMeta: SqliteMeta;
|
|
197
|
-
readonly reason: string;
|
|
198
|
-
};
|
|
199
|
-
declare function readSqliteFenceMismatch(bc: bare.ByteCursor): SqliteFenceMismatch;
|
|
200
|
-
declare function writeSqliteFenceMismatch(bc: bare.ByteCursor, x: SqliteFenceMismatch): void;
|
|
201
|
-
type SqliteDirtyPage = {
|
|
202
|
-
readonly pgno: SqlitePgno;
|
|
203
|
-
readonly bytes: SqlitePageBytes;
|
|
204
|
-
};
|
|
205
|
-
declare function readSqliteDirtyPage(bc: bare.ByteCursor): SqliteDirtyPage;
|
|
206
|
-
declare function writeSqliteDirtyPage(bc: bare.ByteCursor, x: SqliteDirtyPage): void;
|
|
207
|
-
type SqliteFetchedPage = {
|
|
208
|
-
readonly pgno: SqlitePgno;
|
|
209
|
-
readonly bytes: SqlitePageBytes | null;
|
|
210
|
-
};
|
|
211
|
-
declare function readSqliteFetchedPage(bc: bare.ByteCursor): SqliteFetchedPage;
|
|
212
|
-
declare function writeSqliteFetchedPage(bc: bare.ByteCursor, x: SqliteFetchedPage): void;
|
|
213
|
-
type SqliteGetPagesRequest = {
|
|
214
|
-
readonly actorId: Id;
|
|
215
|
-
readonly generation: SqliteGeneration;
|
|
216
|
-
readonly pgnos: readonly SqlitePgno[];
|
|
217
|
-
};
|
|
218
|
-
declare function readSqliteGetPagesRequest(bc: bare.ByteCursor): SqliteGetPagesRequest;
|
|
219
|
-
declare function writeSqliteGetPagesRequest(bc: bare.ByteCursor, x: SqliteGetPagesRequest): void;
|
|
220
|
-
type SqliteGetPagesOk = {
|
|
221
|
-
readonly pages: readonly SqliteFetchedPage[];
|
|
222
|
-
readonly meta: SqliteMeta;
|
|
223
|
-
};
|
|
224
|
-
declare function readSqliteGetPagesOk(bc: bare.ByteCursor): SqliteGetPagesOk;
|
|
225
|
-
declare function writeSqliteGetPagesOk(bc: bare.ByteCursor, x: SqliteGetPagesOk): void;
|
|
226
|
-
type SqliteGetPagesResponse = {
|
|
227
|
-
readonly tag: "SqliteGetPagesOk";
|
|
228
|
-
readonly val: SqliteGetPagesOk;
|
|
229
|
-
} | {
|
|
230
|
-
readonly tag: "SqliteFenceMismatch";
|
|
231
|
-
readonly val: SqliteFenceMismatch;
|
|
232
|
-
};
|
|
233
|
-
declare function readSqliteGetPagesResponse(bc: bare.ByteCursor): SqliteGetPagesResponse;
|
|
234
|
-
declare function writeSqliteGetPagesResponse(bc: bare.ByteCursor, x: SqliteGetPagesResponse): void;
|
|
235
|
-
type SqliteCommitRequest = {
|
|
236
|
-
readonly actorId: Id;
|
|
237
|
-
readonly generation: SqliteGeneration;
|
|
238
|
-
readonly expectedHeadTxid: SqliteTxid;
|
|
239
|
-
readonly dirtyPages: readonly SqliteDirtyPage[];
|
|
240
|
-
readonly newDbSizePages: u32;
|
|
241
|
-
};
|
|
242
|
-
declare function readSqliteCommitRequest(bc: bare.ByteCursor): SqliteCommitRequest;
|
|
243
|
-
declare function writeSqliteCommitRequest(bc: bare.ByteCursor, x: SqliteCommitRequest): void;
|
|
244
|
-
type SqliteCommitOk = {
|
|
245
|
-
readonly newHeadTxid: SqliteTxid;
|
|
246
|
-
readonly meta: SqliteMeta;
|
|
247
|
-
};
|
|
248
|
-
declare function readSqliteCommitOk(bc: bare.ByteCursor): SqliteCommitOk;
|
|
249
|
-
declare function writeSqliteCommitOk(bc: bare.ByteCursor, x: SqliteCommitOk): void;
|
|
250
|
-
type SqliteCommitTooLarge = {
|
|
251
|
-
readonly actualSizeBytes: u64;
|
|
252
|
-
readonly maxSizeBytes: u64;
|
|
253
|
-
};
|
|
254
|
-
declare function readSqliteCommitTooLarge(bc: bare.ByteCursor): SqliteCommitTooLarge;
|
|
255
|
-
declare function writeSqliteCommitTooLarge(bc: bare.ByteCursor, x: SqliteCommitTooLarge): void;
|
|
256
|
-
type SqliteCommitResponse = {
|
|
257
|
-
readonly tag: "SqliteCommitOk";
|
|
258
|
-
readonly val: SqliteCommitOk;
|
|
259
|
-
} | {
|
|
260
|
-
readonly tag: "SqliteFenceMismatch";
|
|
261
|
-
readonly val: SqliteFenceMismatch;
|
|
262
|
-
} | {
|
|
263
|
-
readonly tag: "SqliteCommitTooLarge";
|
|
264
|
-
readonly val: SqliteCommitTooLarge;
|
|
265
|
-
};
|
|
266
|
-
declare function readSqliteCommitResponse(bc: bare.ByteCursor): SqliteCommitResponse;
|
|
267
|
-
declare function writeSqliteCommitResponse(bc: bare.ByteCursor, x: SqliteCommitResponse): void;
|
|
268
|
-
type SqliteCommitStageRequest = {
|
|
269
|
-
readonly actorId: Id;
|
|
270
|
-
readonly generation: SqliteGeneration;
|
|
271
|
-
readonly stageId: SqliteStageId;
|
|
272
|
-
readonly chunkIdx: u16;
|
|
273
|
-
readonly dirtyPages: readonly SqliteDirtyPage[];
|
|
274
|
-
readonly isLast: boolean;
|
|
275
|
-
};
|
|
276
|
-
declare function readSqliteCommitStageRequest(bc: bare.ByteCursor): SqliteCommitStageRequest;
|
|
277
|
-
declare function writeSqliteCommitStageRequest(bc: bare.ByteCursor, x: SqliteCommitStageRequest): void;
|
|
278
|
-
type SqliteCommitStageOk = {
|
|
279
|
-
readonly chunkIdxCommitted: u16;
|
|
280
|
-
};
|
|
281
|
-
declare function readSqliteCommitStageOk(bc: bare.ByteCursor): SqliteCommitStageOk;
|
|
282
|
-
declare function writeSqliteCommitStageOk(bc: bare.ByteCursor, x: SqliteCommitStageOk): void;
|
|
283
|
-
type SqliteCommitStageResponse = {
|
|
284
|
-
readonly tag: "SqliteCommitStageOk";
|
|
285
|
-
readonly val: SqliteCommitStageOk;
|
|
286
|
-
} | {
|
|
287
|
-
readonly tag: "SqliteFenceMismatch";
|
|
288
|
-
readonly val: SqliteFenceMismatch;
|
|
289
|
-
};
|
|
290
|
-
declare function readSqliteCommitStageResponse(bc: bare.ByteCursor): SqliteCommitStageResponse;
|
|
291
|
-
declare function writeSqliteCommitStageResponse(bc: bare.ByteCursor, x: SqliteCommitStageResponse): void;
|
|
292
|
-
type SqliteCommitFinalizeRequest = {
|
|
293
|
-
readonly actorId: Id;
|
|
294
|
-
readonly generation: SqliteGeneration;
|
|
295
|
-
readonly expectedHeadTxid: SqliteTxid;
|
|
296
|
-
readonly stageId: SqliteStageId;
|
|
297
|
-
readonly newDbSizePages: u32;
|
|
298
|
-
};
|
|
299
|
-
declare function readSqliteCommitFinalizeRequest(bc: bare.ByteCursor): SqliteCommitFinalizeRequest;
|
|
300
|
-
declare function writeSqliteCommitFinalizeRequest(bc: bare.ByteCursor, x: SqliteCommitFinalizeRequest): void;
|
|
301
|
-
type SqliteCommitFinalizeOk = {
|
|
302
|
-
readonly newHeadTxid: SqliteTxid;
|
|
303
|
-
readonly meta: SqliteMeta;
|
|
304
|
-
};
|
|
305
|
-
declare function readSqliteCommitFinalizeOk(bc: bare.ByteCursor): SqliteCommitFinalizeOk;
|
|
306
|
-
declare function writeSqliteCommitFinalizeOk(bc: bare.ByteCursor, x: SqliteCommitFinalizeOk): void;
|
|
307
|
-
type SqliteStageNotFound = {
|
|
308
|
-
readonly stageId: SqliteStageId;
|
|
309
|
-
};
|
|
310
|
-
declare function readSqliteStageNotFound(bc: bare.ByteCursor): SqliteStageNotFound;
|
|
311
|
-
declare function writeSqliteStageNotFound(bc: bare.ByteCursor, x: SqliteStageNotFound): void;
|
|
312
|
-
type SqliteCommitFinalizeResponse = {
|
|
313
|
-
readonly tag: "SqliteCommitFinalizeOk";
|
|
314
|
-
readonly val: SqliteCommitFinalizeOk;
|
|
315
|
-
} | {
|
|
316
|
-
readonly tag: "SqliteFenceMismatch";
|
|
317
|
-
readonly val: SqliteFenceMismatch;
|
|
318
|
-
} | {
|
|
319
|
-
readonly tag: "SqliteStageNotFound";
|
|
320
|
-
readonly val: SqliteStageNotFound;
|
|
321
|
-
};
|
|
322
|
-
declare function readSqliteCommitFinalizeResponse(bc: bare.ByteCursor): SqliteCommitFinalizeResponse;
|
|
323
|
-
declare function writeSqliteCommitFinalizeResponse(bc: bare.ByteCursor, x: SqliteCommitFinalizeResponse): void;
|
|
324
|
-
type SqliteStartupData = {
|
|
325
|
-
readonly generation: SqliteGeneration;
|
|
326
|
-
readonly meta: SqliteMeta;
|
|
327
|
-
readonly preloadedPages: readonly SqliteFetchedPage[];
|
|
328
|
-
};
|
|
329
|
-
declare function readSqliteStartupData(bc: bare.ByteCursor): SqliteStartupData;
|
|
330
|
-
declare function writeSqliteStartupData(bc: bare.ByteCursor, x: SqliteStartupData): void;
|
|
331
168
|
/**
|
|
332
169
|
* Core
|
|
333
170
|
*/
|
|
@@ -450,8 +287,6 @@ type CommandStartActor = {
|
|
|
450
287
|
readonly config: ActorConfig;
|
|
451
288
|
readonly hibernatingRequests: readonly HibernatingRequest[];
|
|
452
289
|
readonly preloadedKv: PreloadedKv | null;
|
|
453
|
-
readonly sqliteSchemaVersion: u32;
|
|
454
|
-
readonly sqliteStartupData: SqliteStartupData | null;
|
|
455
290
|
};
|
|
456
291
|
declare function readCommandStartActor(bc: bare.ByteCursor): CommandStartActor;
|
|
457
292
|
declare function writeCommandStartActor(bc: bare.ByteCursor, x: CommandStartActor): void;
|
|
@@ -708,30 +543,6 @@ type ToRivetKvRequest = {
|
|
|
708
543
|
};
|
|
709
544
|
declare function readToRivetKvRequest(bc: bare.ByteCursor): ToRivetKvRequest;
|
|
710
545
|
declare function writeToRivetKvRequest(bc: bare.ByteCursor, x: ToRivetKvRequest): void;
|
|
711
|
-
type ToRivetSqliteGetPagesRequest = {
|
|
712
|
-
readonly requestId: u32;
|
|
713
|
-
readonly data: SqliteGetPagesRequest;
|
|
714
|
-
};
|
|
715
|
-
declare function readToRivetSqliteGetPagesRequest(bc: bare.ByteCursor): ToRivetSqliteGetPagesRequest;
|
|
716
|
-
declare function writeToRivetSqliteGetPagesRequest(bc: bare.ByteCursor, x: ToRivetSqliteGetPagesRequest): void;
|
|
717
|
-
type ToRivetSqliteCommitRequest = {
|
|
718
|
-
readonly requestId: u32;
|
|
719
|
-
readonly data: SqliteCommitRequest;
|
|
720
|
-
};
|
|
721
|
-
declare function readToRivetSqliteCommitRequest(bc: bare.ByteCursor): ToRivetSqliteCommitRequest;
|
|
722
|
-
declare function writeToRivetSqliteCommitRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitRequest): void;
|
|
723
|
-
type ToRivetSqliteCommitStageRequest = {
|
|
724
|
-
readonly requestId: u32;
|
|
725
|
-
readonly data: SqliteCommitStageRequest;
|
|
726
|
-
};
|
|
727
|
-
declare function readToRivetSqliteCommitStageRequest(bc: bare.ByteCursor): ToRivetSqliteCommitStageRequest;
|
|
728
|
-
declare function writeToRivetSqliteCommitStageRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitStageRequest): void;
|
|
729
|
-
type ToRivetSqliteCommitFinalizeRequest = {
|
|
730
|
-
readonly requestId: u32;
|
|
731
|
-
readonly data: SqliteCommitFinalizeRequest;
|
|
732
|
-
};
|
|
733
|
-
declare function readToRivetSqliteCommitFinalizeRequest(bc: bare.ByteCursor): ToRivetSqliteCommitFinalizeRequest;
|
|
734
|
-
declare function writeToRivetSqliteCommitFinalizeRequest(bc: bare.ByteCursor, x: ToRivetSqliteCommitFinalizeRequest): void;
|
|
735
546
|
type ToRivet = {
|
|
736
547
|
readonly tag: "ToRivetMetadata";
|
|
737
548
|
readonly val: ToRivetMetadata;
|
|
@@ -753,18 +564,6 @@ type ToRivet = {
|
|
|
753
564
|
} | {
|
|
754
565
|
readonly tag: "ToRivetTunnelMessage";
|
|
755
566
|
readonly val: ToRivetTunnelMessage;
|
|
756
|
-
} | {
|
|
757
|
-
readonly tag: "ToRivetSqliteGetPagesRequest";
|
|
758
|
-
readonly val: ToRivetSqliteGetPagesRequest;
|
|
759
|
-
} | {
|
|
760
|
-
readonly tag: "ToRivetSqliteCommitRequest";
|
|
761
|
-
readonly val: ToRivetSqliteCommitRequest;
|
|
762
|
-
} | {
|
|
763
|
-
readonly tag: "ToRivetSqliteCommitStageRequest";
|
|
764
|
-
readonly val: ToRivetSqliteCommitStageRequest;
|
|
765
|
-
} | {
|
|
766
|
-
readonly tag: "ToRivetSqliteCommitFinalizeRequest";
|
|
767
|
-
readonly val: ToRivetSqliteCommitFinalizeRequest;
|
|
768
567
|
};
|
|
769
568
|
declare function readToRivet(bc: bare.ByteCursor): ToRivet;
|
|
770
569
|
declare function writeToRivet(bc: bare.ByteCursor, x: ToRivet): void;
|
|
@@ -799,30 +598,6 @@ type ToEnvoyKvResponse = {
|
|
|
799
598
|
};
|
|
800
599
|
declare function readToEnvoyKvResponse(bc: bare.ByteCursor): ToEnvoyKvResponse;
|
|
801
600
|
declare function writeToEnvoyKvResponse(bc: bare.ByteCursor, x: ToEnvoyKvResponse): void;
|
|
802
|
-
type ToEnvoySqliteGetPagesResponse = {
|
|
803
|
-
readonly requestId: u32;
|
|
804
|
-
readonly data: SqliteGetPagesResponse;
|
|
805
|
-
};
|
|
806
|
-
declare function readToEnvoySqliteGetPagesResponse(bc: bare.ByteCursor): ToEnvoySqliteGetPagesResponse;
|
|
807
|
-
declare function writeToEnvoySqliteGetPagesResponse(bc: bare.ByteCursor, x: ToEnvoySqliteGetPagesResponse): void;
|
|
808
|
-
type ToEnvoySqliteCommitResponse = {
|
|
809
|
-
readonly requestId: u32;
|
|
810
|
-
readonly data: SqliteCommitResponse;
|
|
811
|
-
};
|
|
812
|
-
declare function readToEnvoySqliteCommitResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitResponse;
|
|
813
|
-
declare function writeToEnvoySqliteCommitResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitResponse): void;
|
|
814
|
-
type ToEnvoySqliteCommitStageResponse = {
|
|
815
|
-
readonly requestId: u32;
|
|
816
|
-
readonly data: SqliteCommitStageResponse;
|
|
817
|
-
};
|
|
818
|
-
declare function readToEnvoySqliteCommitStageResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitStageResponse;
|
|
819
|
-
declare function writeToEnvoySqliteCommitStageResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitStageResponse): void;
|
|
820
|
-
type ToEnvoySqliteCommitFinalizeResponse = {
|
|
821
|
-
readonly requestId: u32;
|
|
822
|
-
readonly data: SqliteCommitFinalizeResponse;
|
|
823
|
-
};
|
|
824
|
-
declare function readToEnvoySqliteCommitFinalizeResponse(bc: bare.ByteCursor): ToEnvoySqliteCommitFinalizeResponse;
|
|
825
|
-
declare function writeToEnvoySqliteCommitFinalizeResponse(bc: bare.ByteCursor, x: ToEnvoySqliteCommitFinalizeResponse): void;
|
|
826
601
|
type ToEnvoy = {
|
|
827
602
|
readonly tag: "ToEnvoyInit";
|
|
828
603
|
readonly val: ToEnvoyInit;
|
|
@@ -841,18 +616,6 @@ type ToEnvoy = {
|
|
|
841
616
|
} | {
|
|
842
617
|
readonly tag: "ToEnvoyPing";
|
|
843
618
|
readonly val: ToEnvoyPing;
|
|
844
|
-
} | {
|
|
845
|
-
readonly tag: "ToEnvoySqliteGetPagesResponse";
|
|
846
|
-
readonly val: ToEnvoySqliteGetPagesResponse;
|
|
847
|
-
} | {
|
|
848
|
-
readonly tag: "ToEnvoySqliteCommitResponse";
|
|
849
|
-
readonly val: ToEnvoySqliteCommitResponse;
|
|
850
|
-
} | {
|
|
851
|
-
readonly tag: "ToEnvoySqliteCommitStageResponse";
|
|
852
|
-
readonly val: ToEnvoySqliteCommitStageResponse;
|
|
853
|
-
} | {
|
|
854
|
-
readonly tag: "ToEnvoySqliteCommitFinalizeResponse";
|
|
855
|
-
readonly val: ToEnvoySqliteCommitFinalizeResponse;
|
|
856
619
|
};
|
|
857
620
|
declare function readToEnvoy(bc: bare.ByteCursor): ToEnvoy;
|
|
858
621
|
declare function writeToEnvoy(bc: bare.ByteCursor, x: ToEnvoy): void;
|
|
@@ -928,6 +691,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
|
|
|
928
691
|
declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
|
|
929
692
|
declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
|
|
930
693
|
declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
|
|
931
|
-
declare const VERSION =
|
|
694
|
+
declare const VERSION = 1;
|
|
932
695
|
|
|
933
|
-
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,
|
|
696
|
+
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, 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 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 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, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseChunk, readToRivetResponseStart, 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, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
|
package/dist/index.js
CHANGED
|
@@ -366,404 +366,6 @@ 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
|
-
function readSqlitePgno(bc) {
|
|
382
|
-
return bare.readU32(bc);
|
|
383
|
-
}
|
|
384
|
-
function writeSqlitePgno(bc, x) {
|
|
385
|
-
bare.writeU32(bc, x);
|
|
386
|
-
}
|
|
387
|
-
function readSqliteStageId(bc) {
|
|
388
|
-
return bare.readU64(bc);
|
|
389
|
-
}
|
|
390
|
-
function writeSqliteStageId(bc, x) {
|
|
391
|
-
bare.writeU64(bc, x);
|
|
392
|
-
}
|
|
393
|
-
function readSqlitePageBytes(bc) {
|
|
394
|
-
return bare.readData(bc);
|
|
395
|
-
}
|
|
396
|
-
function writeSqlitePageBytes(bc, x) {
|
|
397
|
-
bare.writeData(bc, x);
|
|
398
|
-
}
|
|
399
|
-
function readSqliteMeta(bc) {
|
|
400
|
-
return {
|
|
401
|
-
schemaVersion: bare.readU32(bc),
|
|
402
|
-
generation: readSqliteGeneration(bc),
|
|
403
|
-
headTxid: readSqliteTxid(bc),
|
|
404
|
-
materializedTxid: readSqliteTxid(bc),
|
|
405
|
-
dbSizePages: bare.readU32(bc),
|
|
406
|
-
pageSize: bare.readU32(bc),
|
|
407
|
-
creationTsMs: bare.readI64(bc),
|
|
408
|
-
maxDeltaBytes: bare.readU64(bc)
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
function writeSqliteMeta(bc, x) {
|
|
412
|
-
bare.writeU32(bc, x.schemaVersion);
|
|
413
|
-
writeSqliteGeneration(bc, x.generation);
|
|
414
|
-
writeSqliteTxid(bc, x.headTxid);
|
|
415
|
-
writeSqliteTxid(bc, x.materializedTxid);
|
|
416
|
-
bare.writeU32(bc, x.dbSizePages);
|
|
417
|
-
bare.writeU32(bc, x.pageSize);
|
|
418
|
-
bare.writeI64(bc, x.creationTsMs);
|
|
419
|
-
bare.writeU64(bc, x.maxDeltaBytes);
|
|
420
|
-
}
|
|
421
|
-
function readSqliteFenceMismatch(bc) {
|
|
422
|
-
return {
|
|
423
|
-
actualMeta: readSqliteMeta(bc),
|
|
424
|
-
reason: bare.readString(bc)
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
function writeSqliteFenceMismatch(bc, x) {
|
|
428
|
-
writeSqliteMeta(bc, x.actualMeta);
|
|
429
|
-
bare.writeString(bc, x.reason);
|
|
430
|
-
}
|
|
431
|
-
function readSqliteDirtyPage(bc) {
|
|
432
|
-
return {
|
|
433
|
-
pgno: readSqlitePgno(bc),
|
|
434
|
-
bytes: readSqlitePageBytes(bc)
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
function writeSqliteDirtyPage(bc, x) {
|
|
438
|
-
writeSqlitePgno(bc, x.pgno);
|
|
439
|
-
writeSqlitePageBytes(bc, x.bytes);
|
|
440
|
-
}
|
|
441
|
-
function read5(bc) {
|
|
442
|
-
return bare.readBool(bc) ? readSqlitePageBytes(bc) : null;
|
|
443
|
-
}
|
|
444
|
-
function write5(bc, x) {
|
|
445
|
-
bare.writeBool(bc, x != null);
|
|
446
|
-
if (x != null) {
|
|
447
|
-
writeSqlitePageBytes(bc, x);
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
function readSqliteFetchedPage(bc) {
|
|
451
|
-
return {
|
|
452
|
-
pgno: readSqlitePgno(bc),
|
|
453
|
-
bytes: read5(bc)
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
function writeSqliteFetchedPage(bc, x) {
|
|
457
|
-
writeSqlitePgno(bc, x.pgno);
|
|
458
|
-
write5(bc, x.bytes);
|
|
459
|
-
}
|
|
460
|
-
function read6(bc) {
|
|
461
|
-
const len = bare.readUintSafe(bc);
|
|
462
|
-
if (len === 0) {
|
|
463
|
-
return [];
|
|
464
|
-
}
|
|
465
|
-
const result = [readSqlitePgno(bc)];
|
|
466
|
-
for (let i = 1; i < len; i++) {
|
|
467
|
-
result[i] = readSqlitePgno(bc);
|
|
468
|
-
}
|
|
469
|
-
return result;
|
|
470
|
-
}
|
|
471
|
-
function write6(bc, x) {
|
|
472
|
-
bare.writeUintSafe(bc, x.length);
|
|
473
|
-
for (let i = 0; i < x.length; i++) {
|
|
474
|
-
writeSqlitePgno(bc, x[i]);
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
function readSqliteGetPagesRequest(bc) {
|
|
478
|
-
return {
|
|
479
|
-
actorId: readId(bc),
|
|
480
|
-
generation: readSqliteGeneration(bc),
|
|
481
|
-
pgnos: read6(bc)
|
|
482
|
-
};
|
|
483
|
-
}
|
|
484
|
-
function writeSqliteGetPagesRequest(bc, x) {
|
|
485
|
-
writeId(bc, x.actorId);
|
|
486
|
-
writeSqliteGeneration(bc, x.generation);
|
|
487
|
-
write6(bc, x.pgnos);
|
|
488
|
-
}
|
|
489
|
-
function read7(bc) {
|
|
490
|
-
const len = bare.readUintSafe(bc);
|
|
491
|
-
if (len === 0) {
|
|
492
|
-
return [];
|
|
493
|
-
}
|
|
494
|
-
const result = [readSqliteFetchedPage(bc)];
|
|
495
|
-
for (let i = 1; i < len; i++) {
|
|
496
|
-
result[i] = readSqliteFetchedPage(bc);
|
|
497
|
-
}
|
|
498
|
-
return result;
|
|
499
|
-
}
|
|
500
|
-
function write7(bc, x) {
|
|
501
|
-
bare.writeUintSafe(bc, x.length);
|
|
502
|
-
for (let i = 0; i < x.length; i++) {
|
|
503
|
-
writeSqliteFetchedPage(bc, x[i]);
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
function readSqliteGetPagesOk(bc) {
|
|
507
|
-
return {
|
|
508
|
-
pages: read7(bc),
|
|
509
|
-
meta: readSqliteMeta(bc)
|
|
510
|
-
};
|
|
511
|
-
}
|
|
512
|
-
function writeSqliteGetPagesOk(bc, x) {
|
|
513
|
-
write7(bc, x.pages);
|
|
514
|
-
writeSqliteMeta(bc, x.meta);
|
|
515
|
-
}
|
|
516
|
-
function readSqliteGetPagesResponse(bc) {
|
|
517
|
-
const offset = bc.offset;
|
|
518
|
-
const tag = bare.readU8(bc);
|
|
519
|
-
switch (tag) {
|
|
520
|
-
case 0:
|
|
521
|
-
return { tag: "SqliteGetPagesOk", val: readSqliteGetPagesOk(bc) };
|
|
522
|
-
case 1:
|
|
523
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
524
|
-
default: {
|
|
525
|
-
bc.offset = offset;
|
|
526
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
|
-
function writeSqliteGetPagesResponse(bc, x) {
|
|
531
|
-
switch (x.tag) {
|
|
532
|
-
case "SqliteGetPagesOk": {
|
|
533
|
-
bare.writeU8(bc, 0);
|
|
534
|
-
writeSqliteGetPagesOk(bc, x.val);
|
|
535
|
-
break;
|
|
536
|
-
}
|
|
537
|
-
case "SqliteFenceMismatch": {
|
|
538
|
-
bare.writeU8(bc, 1);
|
|
539
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
540
|
-
break;
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
function read8(bc) {
|
|
545
|
-
const len = bare.readUintSafe(bc);
|
|
546
|
-
if (len === 0) {
|
|
547
|
-
return [];
|
|
548
|
-
}
|
|
549
|
-
const result = [readSqliteDirtyPage(bc)];
|
|
550
|
-
for (let i = 1; i < len; i++) {
|
|
551
|
-
result[i] = readSqliteDirtyPage(bc);
|
|
552
|
-
}
|
|
553
|
-
return result;
|
|
554
|
-
}
|
|
555
|
-
function write8(bc, x) {
|
|
556
|
-
bare.writeUintSafe(bc, x.length);
|
|
557
|
-
for (let i = 0; i < x.length; i++) {
|
|
558
|
-
writeSqliteDirtyPage(bc, x[i]);
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
|
-
function readSqliteCommitRequest(bc) {
|
|
562
|
-
return {
|
|
563
|
-
actorId: readId(bc),
|
|
564
|
-
generation: readSqliteGeneration(bc),
|
|
565
|
-
expectedHeadTxid: readSqliteTxid(bc),
|
|
566
|
-
dirtyPages: read8(bc),
|
|
567
|
-
newDbSizePages: bare.readU32(bc)
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
function writeSqliteCommitRequest(bc, x) {
|
|
571
|
-
writeId(bc, x.actorId);
|
|
572
|
-
writeSqliteGeneration(bc, x.generation);
|
|
573
|
-
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
574
|
-
write8(bc, x.dirtyPages);
|
|
575
|
-
bare.writeU32(bc, x.newDbSizePages);
|
|
576
|
-
}
|
|
577
|
-
function readSqliteCommitOk(bc) {
|
|
578
|
-
return {
|
|
579
|
-
newHeadTxid: readSqliteTxid(bc),
|
|
580
|
-
meta: readSqliteMeta(bc)
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
function writeSqliteCommitOk(bc, x) {
|
|
584
|
-
writeSqliteTxid(bc, x.newHeadTxid);
|
|
585
|
-
writeSqliteMeta(bc, x.meta);
|
|
586
|
-
}
|
|
587
|
-
function readSqliteCommitTooLarge(bc) {
|
|
588
|
-
return {
|
|
589
|
-
actualSizeBytes: bare.readU64(bc),
|
|
590
|
-
maxSizeBytes: bare.readU64(bc)
|
|
591
|
-
};
|
|
592
|
-
}
|
|
593
|
-
function writeSqliteCommitTooLarge(bc, x) {
|
|
594
|
-
bare.writeU64(bc, x.actualSizeBytes);
|
|
595
|
-
bare.writeU64(bc, x.maxSizeBytes);
|
|
596
|
-
}
|
|
597
|
-
function readSqliteCommitResponse(bc) {
|
|
598
|
-
const offset = bc.offset;
|
|
599
|
-
const tag = bare.readU8(bc);
|
|
600
|
-
switch (tag) {
|
|
601
|
-
case 0:
|
|
602
|
-
return { tag: "SqliteCommitOk", val: readSqliteCommitOk(bc) };
|
|
603
|
-
case 1:
|
|
604
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
605
|
-
case 2:
|
|
606
|
-
return { tag: "SqliteCommitTooLarge", val: readSqliteCommitTooLarge(bc) };
|
|
607
|
-
default: {
|
|
608
|
-
bc.offset = offset;
|
|
609
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
function writeSqliteCommitResponse(bc, x) {
|
|
614
|
-
switch (x.tag) {
|
|
615
|
-
case "SqliteCommitOk": {
|
|
616
|
-
bare.writeU8(bc, 0);
|
|
617
|
-
writeSqliteCommitOk(bc, x.val);
|
|
618
|
-
break;
|
|
619
|
-
}
|
|
620
|
-
case "SqliteFenceMismatch": {
|
|
621
|
-
bare.writeU8(bc, 1);
|
|
622
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
623
|
-
break;
|
|
624
|
-
}
|
|
625
|
-
case "SqliteCommitTooLarge": {
|
|
626
|
-
bare.writeU8(bc, 2);
|
|
627
|
-
writeSqliteCommitTooLarge(bc, x.val);
|
|
628
|
-
break;
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
function readSqliteCommitStageRequest(bc) {
|
|
633
|
-
return {
|
|
634
|
-
actorId: readId(bc),
|
|
635
|
-
generation: readSqliteGeneration(bc),
|
|
636
|
-
stageId: readSqliteStageId(bc),
|
|
637
|
-
chunkIdx: bare.readU16(bc),
|
|
638
|
-
dirtyPages: read8(bc),
|
|
639
|
-
isLast: bare.readBool(bc)
|
|
640
|
-
};
|
|
641
|
-
}
|
|
642
|
-
function writeSqliteCommitStageRequest(bc, x) {
|
|
643
|
-
writeId(bc, x.actorId);
|
|
644
|
-
writeSqliteGeneration(bc, x.generation);
|
|
645
|
-
writeSqliteStageId(bc, x.stageId);
|
|
646
|
-
bare.writeU16(bc, x.chunkIdx);
|
|
647
|
-
write8(bc, x.dirtyPages);
|
|
648
|
-
bare.writeBool(bc, x.isLast);
|
|
649
|
-
}
|
|
650
|
-
function readSqliteCommitStageOk(bc) {
|
|
651
|
-
return {
|
|
652
|
-
chunkIdxCommitted: bare.readU16(bc)
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
function writeSqliteCommitStageOk(bc, x) {
|
|
656
|
-
bare.writeU16(bc, x.chunkIdxCommitted);
|
|
657
|
-
}
|
|
658
|
-
function readSqliteCommitStageResponse(bc) {
|
|
659
|
-
const offset = bc.offset;
|
|
660
|
-
const tag = bare.readU8(bc);
|
|
661
|
-
switch (tag) {
|
|
662
|
-
case 0:
|
|
663
|
-
return { tag: "SqliteCommitStageOk", val: readSqliteCommitStageOk(bc) };
|
|
664
|
-
case 1:
|
|
665
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
666
|
-
default: {
|
|
667
|
-
bc.offset = offset;
|
|
668
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
function writeSqliteCommitStageResponse(bc, x) {
|
|
673
|
-
switch (x.tag) {
|
|
674
|
-
case "SqliteCommitStageOk": {
|
|
675
|
-
bare.writeU8(bc, 0);
|
|
676
|
-
writeSqliteCommitStageOk(bc, x.val);
|
|
677
|
-
break;
|
|
678
|
-
}
|
|
679
|
-
case "SqliteFenceMismatch": {
|
|
680
|
-
bare.writeU8(bc, 1);
|
|
681
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
682
|
-
break;
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
function readSqliteCommitFinalizeRequest(bc) {
|
|
687
|
-
return {
|
|
688
|
-
actorId: readId(bc),
|
|
689
|
-
generation: readSqliteGeneration(bc),
|
|
690
|
-
expectedHeadTxid: readSqliteTxid(bc),
|
|
691
|
-
stageId: readSqliteStageId(bc),
|
|
692
|
-
newDbSizePages: bare.readU32(bc)
|
|
693
|
-
};
|
|
694
|
-
}
|
|
695
|
-
function writeSqliteCommitFinalizeRequest(bc, x) {
|
|
696
|
-
writeId(bc, x.actorId);
|
|
697
|
-
writeSqliteGeneration(bc, x.generation);
|
|
698
|
-
writeSqliteTxid(bc, x.expectedHeadTxid);
|
|
699
|
-
writeSqliteStageId(bc, x.stageId);
|
|
700
|
-
bare.writeU32(bc, x.newDbSizePages);
|
|
701
|
-
}
|
|
702
|
-
function readSqliteCommitFinalizeOk(bc) {
|
|
703
|
-
return {
|
|
704
|
-
newHeadTxid: readSqliteTxid(bc),
|
|
705
|
-
meta: readSqliteMeta(bc)
|
|
706
|
-
};
|
|
707
|
-
}
|
|
708
|
-
function writeSqliteCommitFinalizeOk(bc, x) {
|
|
709
|
-
writeSqliteTxid(bc, x.newHeadTxid);
|
|
710
|
-
writeSqliteMeta(bc, x.meta);
|
|
711
|
-
}
|
|
712
|
-
function readSqliteStageNotFound(bc) {
|
|
713
|
-
return {
|
|
714
|
-
stageId: readSqliteStageId(bc)
|
|
715
|
-
};
|
|
716
|
-
}
|
|
717
|
-
function writeSqliteStageNotFound(bc, x) {
|
|
718
|
-
writeSqliteStageId(bc, x.stageId);
|
|
719
|
-
}
|
|
720
|
-
function readSqliteCommitFinalizeResponse(bc) {
|
|
721
|
-
const offset = bc.offset;
|
|
722
|
-
const tag = bare.readU8(bc);
|
|
723
|
-
switch (tag) {
|
|
724
|
-
case 0:
|
|
725
|
-
return { tag: "SqliteCommitFinalizeOk", val: readSqliteCommitFinalizeOk(bc) };
|
|
726
|
-
case 1:
|
|
727
|
-
return { tag: "SqliteFenceMismatch", val: readSqliteFenceMismatch(bc) };
|
|
728
|
-
case 2:
|
|
729
|
-
return { tag: "SqliteStageNotFound", val: readSqliteStageNotFound(bc) };
|
|
730
|
-
default: {
|
|
731
|
-
bc.offset = offset;
|
|
732
|
-
throw new bare.BareError(offset, "invalid tag");
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
function writeSqliteCommitFinalizeResponse(bc, x) {
|
|
737
|
-
switch (x.tag) {
|
|
738
|
-
case "SqliteCommitFinalizeOk": {
|
|
739
|
-
bare.writeU8(bc, 0);
|
|
740
|
-
writeSqliteCommitFinalizeOk(bc, x.val);
|
|
741
|
-
break;
|
|
742
|
-
}
|
|
743
|
-
case "SqliteFenceMismatch": {
|
|
744
|
-
bare.writeU8(bc, 1);
|
|
745
|
-
writeSqliteFenceMismatch(bc, x.val);
|
|
746
|
-
break;
|
|
747
|
-
}
|
|
748
|
-
case "SqliteStageNotFound": {
|
|
749
|
-
bare.writeU8(bc, 2);
|
|
750
|
-
writeSqliteStageNotFound(bc, x.val);
|
|
751
|
-
break;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
function readSqliteStartupData(bc) {
|
|
756
|
-
return {
|
|
757
|
-
generation: readSqliteGeneration(bc),
|
|
758
|
-
meta: readSqliteMeta(bc),
|
|
759
|
-
preloadedPages: read7(bc)
|
|
760
|
-
};
|
|
761
|
-
}
|
|
762
|
-
function writeSqliteStartupData(bc, x) {
|
|
763
|
-
writeSqliteGeneration(bc, x.generation);
|
|
764
|
-
writeSqliteMeta(bc, x.meta);
|
|
765
|
-
write7(bc, x.preloadedPages);
|
|
766
|
-
}
|
|
767
369
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
768
370
|
StopCode2["Ok"] = "Ok";
|
|
769
371
|
StopCode2["Error"] = "Error";
|
|
@@ -803,19 +405,19 @@ function readActorName(bc) {
|
|
|
803
405
|
function writeActorName(bc, x) {
|
|
804
406
|
writeJson(bc, x.metadata);
|
|
805
407
|
}
|
|
806
|
-
function
|
|
408
|
+
function read5(bc) {
|
|
807
409
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
808
410
|
}
|
|
809
|
-
function
|
|
411
|
+
function write5(bc, x) {
|
|
810
412
|
bare.writeBool(bc, x != null);
|
|
811
413
|
if (x != null) {
|
|
812
414
|
bare.writeString(bc, x);
|
|
813
415
|
}
|
|
814
416
|
}
|
|
815
|
-
function
|
|
417
|
+
function read6(bc) {
|
|
816
418
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
817
419
|
}
|
|
818
|
-
function
|
|
420
|
+
function write6(bc, x) {
|
|
819
421
|
bare.writeBool(bc, x != null);
|
|
820
422
|
if (x != null) {
|
|
821
423
|
bare.writeData(bc, x);
|
|
@@ -824,16 +426,16 @@ function write10(bc, x) {
|
|
|
824
426
|
function readActorConfig(bc) {
|
|
825
427
|
return {
|
|
826
428
|
name: bare.readString(bc),
|
|
827
|
-
key:
|
|
429
|
+
key: read5(bc),
|
|
828
430
|
createTs: bare.readI64(bc),
|
|
829
|
-
input:
|
|
431
|
+
input: read6(bc)
|
|
830
432
|
};
|
|
831
433
|
}
|
|
832
434
|
function writeActorConfig(bc, x) {
|
|
833
435
|
bare.writeString(bc, x.name);
|
|
834
|
-
|
|
436
|
+
write5(bc, x.key);
|
|
835
437
|
bare.writeI64(bc, x.createTs);
|
|
836
|
-
|
|
438
|
+
write6(bc, x.input);
|
|
837
439
|
}
|
|
838
440
|
function readActorCheckpoint(bc) {
|
|
839
441
|
return {
|
|
@@ -876,12 +478,12 @@ function writeActorIntent(bc, x) {
|
|
|
876
478
|
function readActorStateStopped(bc) {
|
|
877
479
|
return {
|
|
878
480
|
code: readStopCode(bc),
|
|
879
|
-
message:
|
|
481
|
+
message: read5(bc)
|
|
880
482
|
};
|
|
881
483
|
}
|
|
882
484
|
function writeActorStateStopped(bc, x) {
|
|
883
485
|
writeStopCode(bc, x.code);
|
|
884
|
-
|
|
486
|
+
write5(bc, x.message);
|
|
885
487
|
}
|
|
886
488
|
function readActorState(bc) {
|
|
887
489
|
const offset = bc.offset;
|
|
@@ -926,10 +528,10 @@ function readEventActorStateUpdate(bc) {
|
|
|
926
528
|
function writeEventActorStateUpdate(bc, x) {
|
|
927
529
|
writeActorState(bc, x.state);
|
|
928
530
|
}
|
|
929
|
-
function
|
|
531
|
+
function read7(bc) {
|
|
930
532
|
return bare.readBool(bc) ? bare.readI64(bc) : null;
|
|
931
533
|
}
|
|
932
|
-
function
|
|
534
|
+
function write7(bc, x) {
|
|
933
535
|
bare.writeBool(bc, x != null);
|
|
934
536
|
if (x != null) {
|
|
935
537
|
bare.writeI64(bc, x);
|
|
@@ -937,11 +539,11 @@ function write11(bc, x) {
|
|
|
937
539
|
}
|
|
938
540
|
function readEventActorSetAlarm(bc) {
|
|
939
541
|
return {
|
|
940
|
-
alarmTs:
|
|
542
|
+
alarmTs: read7(bc)
|
|
941
543
|
};
|
|
942
544
|
}
|
|
943
545
|
function writeEventActorSetAlarm(bc, x) {
|
|
944
|
-
|
|
546
|
+
write7(bc, x.alarmTs);
|
|
945
547
|
}
|
|
946
548
|
function readEvent(bc) {
|
|
947
549
|
const offset = bc.offset;
|
|
@@ -1000,7 +602,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
1000
602
|
writeKvValue(bc, x.value);
|
|
1001
603
|
writeKvMetadata(bc, x.metadata);
|
|
1002
604
|
}
|
|
1003
|
-
function
|
|
605
|
+
function read8(bc) {
|
|
1004
606
|
const len = bare.readUintSafe(bc);
|
|
1005
607
|
if (len === 0) {
|
|
1006
608
|
return [];
|
|
@@ -1011,7 +613,7 @@ function read12(bc) {
|
|
|
1011
613
|
}
|
|
1012
614
|
return result;
|
|
1013
615
|
}
|
|
1014
|
-
function
|
|
616
|
+
function write8(bc, x) {
|
|
1015
617
|
bare.writeUintSafe(bc, x.length);
|
|
1016
618
|
for (let i = 0; i < x.length; i++) {
|
|
1017
619
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -1019,13 +621,13 @@ function write12(bc, x) {
|
|
|
1019
621
|
}
|
|
1020
622
|
function readPreloadedKv(bc) {
|
|
1021
623
|
return {
|
|
1022
|
-
entries:
|
|
624
|
+
entries: read8(bc),
|
|
1023
625
|
requestedGetKeys: read0(bc),
|
|
1024
626
|
requestedPrefixes: read0(bc)
|
|
1025
627
|
};
|
|
1026
628
|
}
|
|
1027
629
|
function writePreloadedKv(bc, x) {
|
|
1028
|
-
|
|
630
|
+
write8(bc, x.entries);
|
|
1029
631
|
write0(bc, x.requestedGetKeys);
|
|
1030
632
|
write0(bc, x.requestedPrefixes);
|
|
1031
633
|
}
|
|
@@ -1039,7 +641,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
1039
641
|
writeGatewayId(bc, x.gatewayId);
|
|
1040
642
|
writeRequestId(bc, x.requestId);
|
|
1041
643
|
}
|
|
1042
|
-
function
|
|
644
|
+
function read9(bc) {
|
|
1043
645
|
const len = bare.readUintSafe(bc);
|
|
1044
646
|
if (len === 0) {
|
|
1045
647
|
return [];
|
|
@@ -1050,45 +652,32 @@ function read13(bc) {
|
|
|
1050
652
|
}
|
|
1051
653
|
return result;
|
|
1052
654
|
}
|
|
1053
|
-
function
|
|
655
|
+
function write9(bc, x) {
|
|
1054
656
|
bare.writeUintSafe(bc, x.length);
|
|
1055
657
|
for (let i = 0; i < x.length; i++) {
|
|
1056
658
|
writeHibernatingRequest(bc, x[i]);
|
|
1057
659
|
}
|
|
1058
660
|
}
|
|
1059
|
-
function
|
|
661
|
+
function read10(bc) {
|
|
1060
662
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
1061
663
|
}
|
|
1062
|
-
function
|
|
664
|
+
function write10(bc, x) {
|
|
1063
665
|
bare.writeBool(bc, x != null);
|
|
1064
666
|
if (x != null) {
|
|
1065
667
|
writePreloadedKv(bc, x);
|
|
1066
668
|
}
|
|
1067
669
|
}
|
|
1068
|
-
function read15(bc) {
|
|
1069
|
-
return bare.readBool(bc) ? readSqliteStartupData(bc) : null;
|
|
1070
|
-
}
|
|
1071
|
-
function write15(bc, x) {
|
|
1072
|
-
bare.writeBool(bc, x != null);
|
|
1073
|
-
if (x != null) {
|
|
1074
|
-
writeSqliteStartupData(bc, x);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
670
|
function readCommandStartActor(bc) {
|
|
1078
671
|
return {
|
|
1079
672
|
config: readActorConfig(bc),
|
|
1080
|
-
hibernatingRequests:
|
|
1081
|
-
preloadedKv:
|
|
1082
|
-
sqliteSchemaVersion: bare.readU32(bc),
|
|
1083
|
-
sqliteStartupData: read15(bc)
|
|
673
|
+
hibernatingRequests: read9(bc),
|
|
674
|
+
preloadedKv: read10(bc)
|
|
1084
675
|
};
|
|
1085
676
|
}
|
|
1086
677
|
function writeCommandStartActor(bc, x) {
|
|
1087
678
|
writeActorConfig(bc, x.config);
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
bare.writeU32(bc, x.sqliteSchemaVersion);
|
|
1091
|
-
write15(bc, x.sqliteStartupData);
|
|
679
|
+
write9(bc, x.hibernatingRequests);
|
|
680
|
+
write10(bc, x.preloadedKv);
|
|
1092
681
|
}
|
|
1093
682
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
1094
683
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -1245,7 +834,7 @@ function writeMessageId(bc, x) {
|
|
|
1245
834
|
writeRequestId(bc, x.requestId);
|
|
1246
835
|
writeMessageIndex(bc, x.messageIndex);
|
|
1247
836
|
}
|
|
1248
|
-
function
|
|
837
|
+
function read11(bc) {
|
|
1249
838
|
const len = bare.readUintSafe(bc);
|
|
1250
839
|
const result = /* @__PURE__ */ new Map();
|
|
1251
840
|
for (let i = 0; i < len; i++) {
|
|
@@ -1259,7 +848,7 @@ function read16(bc) {
|
|
|
1259
848
|
}
|
|
1260
849
|
return result;
|
|
1261
850
|
}
|
|
1262
|
-
function
|
|
851
|
+
function write11(bc, x) {
|
|
1263
852
|
bare.writeUintSafe(bc, x.size);
|
|
1264
853
|
for (const kv of x) {
|
|
1265
854
|
bare.writeString(bc, kv[0]);
|
|
@@ -1271,8 +860,8 @@ function readToEnvoyRequestStart(bc) {
|
|
|
1271
860
|
actorId: readId(bc),
|
|
1272
861
|
method: bare.readString(bc),
|
|
1273
862
|
path: bare.readString(bc),
|
|
1274
|
-
headers:
|
|
1275
|
-
body:
|
|
863
|
+
headers: read11(bc),
|
|
864
|
+
body: read6(bc),
|
|
1276
865
|
stream: bare.readBool(bc)
|
|
1277
866
|
};
|
|
1278
867
|
}
|
|
@@ -1280,8 +869,8 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
1280
869
|
writeId(bc, x.actorId);
|
|
1281
870
|
bare.writeString(bc, x.method);
|
|
1282
871
|
bare.writeString(bc, x.path);
|
|
1283
|
-
|
|
1284
|
-
|
|
872
|
+
write11(bc, x.headers);
|
|
873
|
+
write6(bc, x.body);
|
|
1285
874
|
bare.writeBool(bc, x.stream);
|
|
1286
875
|
}
|
|
1287
876
|
function readToEnvoyRequestChunk(bc) {
|
|
@@ -1297,15 +886,15 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
1297
886
|
function readToRivetResponseStart(bc) {
|
|
1298
887
|
return {
|
|
1299
888
|
status: bare.readU16(bc),
|
|
1300
|
-
headers:
|
|
1301
|
-
body:
|
|
889
|
+
headers: read11(bc),
|
|
890
|
+
body: read6(bc),
|
|
1302
891
|
stream: bare.readBool(bc)
|
|
1303
892
|
};
|
|
1304
893
|
}
|
|
1305
894
|
function writeToRivetResponseStart(bc, x) {
|
|
1306
895
|
bare.writeU16(bc, x.status);
|
|
1307
|
-
|
|
1308
|
-
|
|
896
|
+
write11(bc, x.headers);
|
|
897
|
+
write6(bc, x.body);
|
|
1309
898
|
bare.writeBool(bc, x.stream);
|
|
1310
899
|
}
|
|
1311
900
|
function readToRivetResponseChunk(bc) {
|
|
@@ -1322,13 +911,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
1322
911
|
return {
|
|
1323
912
|
actorId: readId(bc),
|
|
1324
913
|
path: bare.readString(bc),
|
|
1325
|
-
headers:
|
|
914
|
+
headers: read11(bc)
|
|
1326
915
|
};
|
|
1327
916
|
}
|
|
1328
917
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
1329
918
|
writeId(bc, x.actorId);
|
|
1330
919
|
bare.writeString(bc, x.path);
|
|
1331
|
-
|
|
920
|
+
write11(bc, x.headers);
|
|
1332
921
|
}
|
|
1333
922
|
function readToEnvoyWebSocketMessage(bc) {
|
|
1334
923
|
return {
|
|
@@ -1340,10 +929,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
1340
929
|
bare.writeData(bc, x.data);
|
|
1341
930
|
bare.writeBool(bc, x.binary);
|
|
1342
931
|
}
|
|
1343
|
-
function
|
|
932
|
+
function read12(bc) {
|
|
1344
933
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1345
934
|
}
|
|
1346
|
-
function
|
|
935
|
+
function write12(bc, x) {
|
|
1347
936
|
bare.writeBool(bc, x != null);
|
|
1348
937
|
if (x != null) {
|
|
1349
938
|
bare.writeU16(bc, x);
|
|
@@ -1351,13 +940,13 @@ function write17(bc, x) {
|
|
|
1351
940
|
}
|
|
1352
941
|
function readToEnvoyWebSocketClose(bc) {
|
|
1353
942
|
return {
|
|
1354
|
-
code:
|
|
1355
|
-
reason:
|
|
943
|
+
code: read12(bc),
|
|
944
|
+
reason: read5(bc)
|
|
1356
945
|
};
|
|
1357
946
|
}
|
|
1358
947
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
1359
|
-
|
|
1360
|
-
|
|
948
|
+
write12(bc, x.code);
|
|
949
|
+
write5(bc, x.reason);
|
|
1361
950
|
}
|
|
1362
951
|
function readToRivetWebSocketOpen(bc) {
|
|
1363
952
|
return {
|
|
@@ -1387,14 +976,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
1387
976
|
}
|
|
1388
977
|
function readToRivetWebSocketClose(bc) {
|
|
1389
978
|
return {
|
|
1390
|
-
code:
|
|
1391
|
-
reason:
|
|
979
|
+
code: read12(bc),
|
|
980
|
+
reason: read5(bc),
|
|
1392
981
|
hibernate: bare.readBool(bc)
|
|
1393
982
|
};
|
|
1394
983
|
}
|
|
1395
984
|
function writeToRivetWebSocketClose(bc, x) {
|
|
1396
|
-
|
|
1397
|
-
|
|
985
|
+
write12(bc, x.code);
|
|
986
|
+
write5(bc, x.reason);
|
|
1398
987
|
bare.writeBool(bc, x.hibernate);
|
|
1399
988
|
}
|
|
1400
989
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1542,7 +1131,7 @@ function readToEnvoyPing(bc) {
|
|
|
1542
1131
|
function writeToEnvoyPing(bc, x) {
|
|
1543
1132
|
bare.writeI64(bc, x.ts);
|
|
1544
1133
|
}
|
|
1545
|
-
function
|
|
1134
|
+
function read13(bc) {
|
|
1546
1135
|
const len = bare.readUintSafe(bc);
|
|
1547
1136
|
const result = /* @__PURE__ */ new Map();
|
|
1548
1137
|
for (let i = 0; i < len; i++) {
|
|
@@ -1556,26 +1145,26 @@ function read18(bc) {
|
|
|
1556
1145
|
}
|
|
1557
1146
|
return result;
|
|
1558
1147
|
}
|
|
1559
|
-
function
|
|
1148
|
+
function write13(bc, x) {
|
|
1560
1149
|
bare.writeUintSafe(bc, x.size);
|
|
1561
1150
|
for (const kv of x) {
|
|
1562
1151
|
bare.writeString(bc, kv[0]);
|
|
1563
1152
|
writeActorName(bc, kv[1]);
|
|
1564
1153
|
}
|
|
1565
1154
|
}
|
|
1566
|
-
function
|
|
1567
|
-
return bare.readBool(bc) ?
|
|
1155
|
+
function read14(bc) {
|
|
1156
|
+
return bare.readBool(bc) ? read13(bc) : null;
|
|
1568
1157
|
}
|
|
1569
|
-
function
|
|
1158
|
+
function write14(bc, x) {
|
|
1570
1159
|
bare.writeBool(bc, x != null);
|
|
1571
1160
|
if (x != null) {
|
|
1572
|
-
|
|
1161
|
+
write13(bc, x);
|
|
1573
1162
|
}
|
|
1574
1163
|
}
|
|
1575
|
-
function
|
|
1164
|
+
function read15(bc) {
|
|
1576
1165
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1577
1166
|
}
|
|
1578
|
-
function
|
|
1167
|
+
function write15(bc, x) {
|
|
1579
1168
|
bare.writeBool(bc, x != null);
|
|
1580
1169
|
if (x != null) {
|
|
1581
1170
|
writeJson(bc, x);
|
|
@@ -1583,13 +1172,13 @@ function write20(bc, x) {
|
|
|
1583
1172
|
}
|
|
1584
1173
|
function readToRivetMetadata(bc) {
|
|
1585
1174
|
return {
|
|
1586
|
-
prepopulateActorNames:
|
|
1587
|
-
metadata:
|
|
1175
|
+
prepopulateActorNames: read14(bc),
|
|
1176
|
+
metadata: read15(bc)
|
|
1588
1177
|
};
|
|
1589
1178
|
}
|
|
1590
1179
|
function writeToRivetMetadata(bc, x) {
|
|
1591
|
-
|
|
1592
|
-
|
|
1180
|
+
write14(bc, x.prepopulateActorNames);
|
|
1181
|
+
write15(bc, x.metadata);
|
|
1593
1182
|
}
|
|
1594
1183
|
function readToRivetEvents(bc) {
|
|
1595
1184
|
const len = bare.readUintSafe(bc);
|
|
@@ -1608,7 +1197,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1608
1197
|
writeEventWrapper(bc, x[i]);
|
|
1609
1198
|
}
|
|
1610
1199
|
}
|
|
1611
|
-
function
|
|
1200
|
+
function read16(bc) {
|
|
1612
1201
|
const len = bare.readUintSafe(bc);
|
|
1613
1202
|
if (len === 0) {
|
|
1614
1203
|
return [];
|
|
@@ -1619,7 +1208,7 @@ function read21(bc) {
|
|
|
1619
1208
|
}
|
|
1620
1209
|
return result;
|
|
1621
1210
|
}
|
|
1622
|
-
function
|
|
1211
|
+
function write16(bc, x) {
|
|
1623
1212
|
bare.writeUintSafe(bc, x.length);
|
|
1624
1213
|
for (let i = 0; i < x.length; i++) {
|
|
1625
1214
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1627,11 +1216,11 @@ function write21(bc, x) {
|
|
|
1627
1216
|
}
|
|
1628
1217
|
function readToRivetAckCommands(bc) {
|
|
1629
1218
|
return {
|
|
1630
|
-
lastCommandCheckpoints:
|
|
1219
|
+
lastCommandCheckpoints: read16(bc)
|
|
1631
1220
|
};
|
|
1632
1221
|
}
|
|
1633
1222
|
function writeToRivetAckCommands(bc, x) {
|
|
1634
|
-
|
|
1223
|
+
write16(bc, x.lastCommandCheckpoints);
|
|
1635
1224
|
}
|
|
1636
1225
|
function readToRivetPong(bc) {
|
|
1637
1226
|
return {
|
|
@@ -1653,46 +1242,6 @@ function writeToRivetKvRequest(bc, x) {
|
|
|
1653
1242
|
bare.writeU32(bc, x.requestId);
|
|
1654
1243
|
writeKvRequestData(bc, x.data);
|
|
1655
1244
|
}
|
|
1656
|
-
function readToRivetSqliteGetPagesRequest(bc) {
|
|
1657
|
-
return {
|
|
1658
|
-
requestId: bare.readU32(bc),
|
|
1659
|
-
data: readSqliteGetPagesRequest(bc)
|
|
1660
|
-
};
|
|
1661
|
-
}
|
|
1662
|
-
function writeToRivetSqliteGetPagesRequest(bc, x) {
|
|
1663
|
-
bare.writeU32(bc, x.requestId);
|
|
1664
|
-
writeSqliteGetPagesRequest(bc, x.data);
|
|
1665
|
-
}
|
|
1666
|
-
function readToRivetSqliteCommitRequest(bc) {
|
|
1667
|
-
return {
|
|
1668
|
-
requestId: bare.readU32(bc),
|
|
1669
|
-
data: readSqliteCommitRequest(bc)
|
|
1670
|
-
};
|
|
1671
|
-
}
|
|
1672
|
-
function writeToRivetSqliteCommitRequest(bc, x) {
|
|
1673
|
-
bare.writeU32(bc, x.requestId);
|
|
1674
|
-
writeSqliteCommitRequest(bc, x.data);
|
|
1675
|
-
}
|
|
1676
|
-
function readToRivetSqliteCommitStageRequest(bc) {
|
|
1677
|
-
return {
|
|
1678
|
-
requestId: bare.readU32(bc),
|
|
1679
|
-
data: readSqliteCommitStageRequest(bc)
|
|
1680
|
-
};
|
|
1681
|
-
}
|
|
1682
|
-
function writeToRivetSqliteCommitStageRequest(bc, x) {
|
|
1683
|
-
bare.writeU32(bc, x.requestId);
|
|
1684
|
-
writeSqliteCommitStageRequest(bc, x.data);
|
|
1685
|
-
}
|
|
1686
|
-
function readToRivetSqliteCommitFinalizeRequest(bc) {
|
|
1687
|
-
return {
|
|
1688
|
-
requestId: bare.readU32(bc),
|
|
1689
|
-
data: readSqliteCommitFinalizeRequest(bc)
|
|
1690
|
-
};
|
|
1691
|
-
}
|
|
1692
|
-
function writeToRivetSqliteCommitFinalizeRequest(bc, x) {
|
|
1693
|
-
bare.writeU32(bc, x.requestId);
|
|
1694
|
-
writeSqliteCommitFinalizeRequest(bc, x.data);
|
|
1695
|
-
}
|
|
1696
1245
|
function readToRivet(bc) {
|
|
1697
1246
|
const offset = bc.offset;
|
|
1698
1247
|
const tag = bare.readU8(bc);
|
|
@@ -1711,14 +1260,6 @@ function readToRivet(bc) {
|
|
|
1711
1260
|
return { tag: "ToRivetKvRequest", val: readToRivetKvRequest(bc) };
|
|
1712
1261
|
case 6:
|
|
1713
1262
|
return { tag: "ToRivetTunnelMessage", val: readToRivetTunnelMessage(bc) };
|
|
1714
|
-
case 7:
|
|
1715
|
-
return { tag: "ToRivetSqliteGetPagesRequest", val: readToRivetSqliteGetPagesRequest(bc) };
|
|
1716
|
-
case 8:
|
|
1717
|
-
return { tag: "ToRivetSqliteCommitRequest", val: readToRivetSqliteCommitRequest(bc) };
|
|
1718
|
-
case 9:
|
|
1719
|
-
return { tag: "ToRivetSqliteCommitStageRequest", val: readToRivetSqliteCommitStageRequest(bc) };
|
|
1720
|
-
case 10:
|
|
1721
|
-
return { tag: "ToRivetSqliteCommitFinalizeRequest", val: readToRivetSqliteCommitFinalizeRequest(bc) };
|
|
1722
1263
|
default: {
|
|
1723
1264
|
bc.offset = offset;
|
|
1724
1265
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1761,26 +1302,6 @@ function writeToRivet(bc, x) {
|
|
|
1761
1302
|
writeToRivetTunnelMessage(bc, x.val);
|
|
1762
1303
|
break;
|
|
1763
1304
|
}
|
|
1764
|
-
case "ToRivetSqliteGetPagesRequest": {
|
|
1765
|
-
bare.writeU8(bc, 7);
|
|
1766
|
-
writeToRivetSqliteGetPagesRequest(bc, x.val);
|
|
1767
|
-
break;
|
|
1768
|
-
}
|
|
1769
|
-
case "ToRivetSqliteCommitRequest": {
|
|
1770
|
-
bare.writeU8(bc, 8);
|
|
1771
|
-
writeToRivetSqliteCommitRequest(bc, x.val);
|
|
1772
|
-
break;
|
|
1773
|
-
}
|
|
1774
|
-
case "ToRivetSqliteCommitStageRequest": {
|
|
1775
|
-
bare.writeU8(bc, 9);
|
|
1776
|
-
writeToRivetSqliteCommitStageRequest(bc, x.val);
|
|
1777
|
-
break;
|
|
1778
|
-
}
|
|
1779
|
-
case "ToRivetSqliteCommitFinalizeRequest": {
|
|
1780
|
-
bare.writeU8(bc, 10);
|
|
1781
|
-
writeToRivetSqliteCommitFinalizeRequest(bc, x.val);
|
|
1782
|
-
break;
|
|
1783
|
-
}
|
|
1784
1305
|
}
|
|
1785
1306
|
}
|
|
1786
1307
|
function encodeToRivet(x, config) {
|
|
@@ -1839,11 +1360,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1839
1360
|
}
|
|
1840
1361
|
function readToEnvoyAckEvents(bc) {
|
|
1841
1362
|
return {
|
|
1842
|
-
lastEventCheckpoints:
|
|
1363
|
+
lastEventCheckpoints: read16(bc)
|
|
1843
1364
|
};
|
|
1844
1365
|
}
|
|
1845
1366
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1846
|
-
|
|
1367
|
+
write16(bc, x.lastEventCheckpoints);
|
|
1847
1368
|
}
|
|
1848
1369
|
function readToEnvoyKvResponse(bc) {
|
|
1849
1370
|
return {
|
|
@@ -1855,46 +1376,6 @@ function writeToEnvoyKvResponse(bc, x) {
|
|
|
1855
1376
|
bare.writeU32(bc, x.requestId);
|
|
1856
1377
|
writeKvResponseData(bc, x.data);
|
|
1857
1378
|
}
|
|
1858
|
-
function readToEnvoySqliteGetPagesResponse(bc) {
|
|
1859
|
-
return {
|
|
1860
|
-
requestId: bare.readU32(bc),
|
|
1861
|
-
data: readSqliteGetPagesResponse(bc)
|
|
1862
|
-
};
|
|
1863
|
-
}
|
|
1864
|
-
function writeToEnvoySqliteGetPagesResponse(bc, x) {
|
|
1865
|
-
bare.writeU32(bc, x.requestId);
|
|
1866
|
-
writeSqliteGetPagesResponse(bc, x.data);
|
|
1867
|
-
}
|
|
1868
|
-
function readToEnvoySqliteCommitResponse(bc) {
|
|
1869
|
-
return {
|
|
1870
|
-
requestId: bare.readU32(bc),
|
|
1871
|
-
data: readSqliteCommitResponse(bc)
|
|
1872
|
-
};
|
|
1873
|
-
}
|
|
1874
|
-
function writeToEnvoySqliteCommitResponse(bc, x) {
|
|
1875
|
-
bare.writeU32(bc, x.requestId);
|
|
1876
|
-
writeSqliteCommitResponse(bc, x.data);
|
|
1877
|
-
}
|
|
1878
|
-
function readToEnvoySqliteCommitStageResponse(bc) {
|
|
1879
|
-
return {
|
|
1880
|
-
requestId: bare.readU32(bc),
|
|
1881
|
-
data: readSqliteCommitStageResponse(bc)
|
|
1882
|
-
};
|
|
1883
|
-
}
|
|
1884
|
-
function writeToEnvoySqliteCommitStageResponse(bc, x) {
|
|
1885
|
-
bare.writeU32(bc, x.requestId);
|
|
1886
|
-
writeSqliteCommitStageResponse(bc, x.data);
|
|
1887
|
-
}
|
|
1888
|
-
function readToEnvoySqliteCommitFinalizeResponse(bc) {
|
|
1889
|
-
return {
|
|
1890
|
-
requestId: bare.readU32(bc),
|
|
1891
|
-
data: readSqliteCommitFinalizeResponse(bc)
|
|
1892
|
-
};
|
|
1893
|
-
}
|
|
1894
|
-
function writeToEnvoySqliteCommitFinalizeResponse(bc, x) {
|
|
1895
|
-
bare.writeU32(bc, x.requestId);
|
|
1896
|
-
writeSqliteCommitFinalizeResponse(bc, x.data);
|
|
1897
|
-
}
|
|
1898
1379
|
function readToEnvoy(bc) {
|
|
1899
1380
|
const offset = bc.offset;
|
|
1900
1381
|
const tag = bare.readU8(bc);
|
|
@@ -1911,14 +1392,6 @@ function readToEnvoy(bc) {
|
|
|
1911
1392
|
return { tag: "ToEnvoyTunnelMessage", val: readToEnvoyTunnelMessage(bc) };
|
|
1912
1393
|
case 5:
|
|
1913
1394
|
return { tag: "ToEnvoyPing", val: readToEnvoyPing(bc) };
|
|
1914
|
-
case 6:
|
|
1915
|
-
return { tag: "ToEnvoySqliteGetPagesResponse", val: readToEnvoySqliteGetPagesResponse(bc) };
|
|
1916
|
-
case 7:
|
|
1917
|
-
return { tag: "ToEnvoySqliteCommitResponse", val: readToEnvoySqliteCommitResponse(bc) };
|
|
1918
|
-
case 8:
|
|
1919
|
-
return { tag: "ToEnvoySqliteCommitStageResponse", val: readToEnvoySqliteCommitStageResponse(bc) };
|
|
1920
|
-
case 9:
|
|
1921
|
-
return { tag: "ToEnvoySqliteCommitFinalizeResponse", val: readToEnvoySqliteCommitFinalizeResponse(bc) };
|
|
1922
1395
|
default: {
|
|
1923
1396
|
bc.offset = offset;
|
|
1924
1397
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1957,26 +1430,6 @@ function writeToEnvoy(bc, x) {
|
|
|
1957
1430
|
writeToEnvoyPing(bc, x.val);
|
|
1958
1431
|
break;
|
|
1959
1432
|
}
|
|
1960
|
-
case "ToEnvoySqliteGetPagesResponse": {
|
|
1961
|
-
bare.writeU8(bc, 6);
|
|
1962
|
-
writeToEnvoySqliteGetPagesResponse(bc, x.val);
|
|
1963
|
-
break;
|
|
1964
|
-
}
|
|
1965
|
-
case "ToEnvoySqliteCommitResponse": {
|
|
1966
|
-
bare.writeU8(bc, 7);
|
|
1967
|
-
writeToEnvoySqliteCommitResponse(bc, x.val);
|
|
1968
|
-
break;
|
|
1969
|
-
}
|
|
1970
|
-
case "ToEnvoySqliteCommitStageResponse": {
|
|
1971
|
-
bare.writeU8(bc, 8);
|
|
1972
|
-
writeToEnvoySqliteCommitStageResponse(bc, x.val);
|
|
1973
|
-
break;
|
|
1974
|
-
}
|
|
1975
|
-
case "ToEnvoySqliteCommitFinalizeResponse": {
|
|
1976
|
-
bare.writeU8(bc, 9);
|
|
1977
|
-
writeToEnvoySqliteCommitFinalizeResponse(bc, x.val);
|
|
1978
|
-
break;
|
|
1979
|
-
}
|
|
1980
1433
|
}
|
|
1981
1434
|
}
|
|
1982
1435
|
function encodeToEnvoy(x, config) {
|
|
@@ -2183,7 +1636,7 @@ function decodeToOutbound(bytes) {
|
|
|
2183
1636
|
function assert(condition, message) {
|
|
2184
1637
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
2185
1638
|
}
|
|
2186
|
-
var VERSION =
|
|
1639
|
+
var VERSION = 1;
|
|
2187
1640
|
export {
|
|
2188
1641
|
StopActorReason,
|
|
2189
1642
|
StopCode,
|
|
@@ -2242,30 +1695,6 @@ export {
|
|
|
2242
1695
|
readPreloadedKvEntry,
|
|
2243
1696
|
readProtocolMetadata,
|
|
2244
1697
|
readRequestId,
|
|
2245
|
-
readSqliteCommitFinalizeOk,
|
|
2246
|
-
readSqliteCommitFinalizeRequest,
|
|
2247
|
-
readSqliteCommitFinalizeResponse,
|
|
2248
|
-
readSqliteCommitOk,
|
|
2249
|
-
readSqliteCommitRequest,
|
|
2250
|
-
readSqliteCommitResponse,
|
|
2251
|
-
readSqliteCommitStageOk,
|
|
2252
|
-
readSqliteCommitStageRequest,
|
|
2253
|
-
readSqliteCommitStageResponse,
|
|
2254
|
-
readSqliteCommitTooLarge,
|
|
2255
|
-
readSqliteDirtyPage,
|
|
2256
|
-
readSqliteFenceMismatch,
|
|
2257
|
-
readSqliteFetchedPage,
|
|
2258
|
-
readSqliteGeneration,
|
|
2259
|
-
readSqliteGetPagesOk,
|
|
2260
|
-
readSqliteGetPagesRequest,
|
|
2261
|
-
readSqliteGetPagesResponse,
|
|
2262
|
-
readSqliteMeta,
|
|
2263
|
-
readSqlitePageBytes,
|
|
2264
|
-
readSqlitePgno,
|
|
2265
|
-
readSqliteStageId,
|
|
2266
|
-
readSqliteStageNotFound,
|
|
2267
|
-
readSqliteStartupData,
|
|
2268
|
-
readSqliteTxid,
|
|
2269
1698
|
readStopActorReason,
|
|
2270
1699
|
readStopCode,
|
|
2271
1700
|
readToEnvoy,
|
|
@@ -2278,10 +1707,6 @@ export {
|
|
|
2278
1707
|
readToEnvoyPing,
|
|
2279
1708
|
readToEnvoyRequestChunk,
|
|
2280
1709
|
readToEnvoyRequestStart,
|
|
2281
|
-
readToEnvoySqliteCommitFinalizeResponse,
|
|
2282
|
-
readToEnvoySqliteCommitResponse,
|
|
2283
|
-
readToEnvoySqliteCommitStageResponse,
|
|
2284
|
-
readToEnvoySqliteGetPagesResponse,
|
|
2285
1710
|
readToEnvoyTunnelMessage,
|
|
2286
1711
|
readToEnvoyTunnelMessageKind,
|
|
2287
1712
|
readToEnvoyWebSocketClose,
|
|
@@ -2299,10 +1724,6 @@ export {
|
|
|
2299
1724
|
readToRivetPong,
|
|
2300
1725
|
readToRivetResponseChunk,
|
|
2301
1726
|
readToRivetResponseStart,
|
|
2302
|
-
readToRivetSqliteCommitFinalizeRequest,
|
|
2303
|
-
readToRivetSqliteCommitRequest,
|
|
2304
|
-
readToRivetSqliteCommitStageRequest,
|
|
2305
|
-
readToRivetSqliteGetPagesRequest,
|
|
2306
1727
|
readToRivetTunnelMessage,
|
|
2307
1728
|
readToRivetTunnelMessageKind,
|
|
2308
1729
|
readToRivetWebSocketClose,
|
|
@@ -2351,30 +1772,6 @@ export {
|
|
|
2351
1772
|
writePreloadedKvEntry,
|
|
2352
1773
|
writeProtocolMetadata,
|
|
2353
1774
|
writeRequestId,
|
|
2354
|
-
writeSqliteCommitFinalizeOk,
|
|
2355
|
-
writeSqliteCommitFinalizeRequest,
|
|
2356
|
-
writeSqliteCommitFinalizeResponse,
|
|
2357
|
-
writeSqliteCommitOk,
|
|
2358
|
-
writeSqliteCommitRequest,
|
|
2359
|
-
writeSqliteCommitResponse,
|
|
2360
|
-
writeSqliteCommitStageOk,
|
|
2361
|
-
writeSqliteCommitStageRequest,
|
|
2362
|
-
writeSqliteCommitStageResponse,
|
|
2363
|
-
writeSqliteCommitTooLarge,
|
|
2364
|
-
writeSqliteDirtyPage,
|
|
2365
|
-
writeSqliteFenceMismatch,
|
|
2366
|
-
writeSqliteFetchedPage,
|
|
2367
|
-
writeSqliteGeneration,
|
|
2368
|
-
writeSqliteGetPagesOk,
|
|
2369
|
-
writeSqliteGetPagesRequest,
|
|
2370
|
-
writeSqliteGetPagesResponse,
|
|
2371
|
-
writeSqliteMeta,
|
|
2372
|
-
writeSqlitePageBytes,
|
|
2373
|
-
writeSqlitePgno,
|
|
2374
|
-
writeSqliteStageId,
|
|
2375
|
-
writeSqliteStageNotFound,
|
|
2376
|
-
writeSqliteStartupData,
|
|
2377
|
-
writeSqliteTxid,
|
|
2378
1775
|
writeStopActorReason,
|
|
2379
1776
|
writeStopCode,
|
|
2380
1777
|
writeToEnvoy,
|
|
@@ -2387,10 +1784,6 @@ export {
|
|
|
2387
1784
|
writeToEnvoyPing,
|
|
2388
1785
|
writeToEnvoyRequestChunk,
|
|
2389
1786
|
writeToEnvoyRequestStart,
|
|
2390
|
-
writeToEnvoySqliteCommitFinalizeResponse,
|
|
2391
|
-
writeToEnvoySqliteCommitResponse,
|
|
2392
|
-
writeToEnvoySqliteCommitStageResponse,
|
|
2393
|
-
writeToEnvoySqliteGetPagesResponse,
|
|
2394
1787
|
writeToEnvoyTunnelMessage,
|
|
2395
1788
|
writeToEnvoyTunnelMessageKind,
|
|
2396
1789
|
writeToEnvoyWebSocketClose,
|
|
@@ -2408,10 +1801,6 @@ export {
|
|
|
2408
1801
|
writeToRivetPong,
|
|
2409
1802
|
writeToRivetResponseChunk,
|
|
2410
1803
|
writeToRivetResponseStart,
|
|
2411
|
-
writeToRivetSqliteCommitFinalizeRequest,
|
|
2412
|
-
writeToRivetSqliteCommitRequest,
|
|
2413
|
-
writeToRivetSqliteCommitStageRequest,
|
|
2414
|
-
writeToRivetSqliteGetPagesRequest,
|
|
2415
1804
|
writeToRivetTunnelMessage,
|
|
2416
1805
|
writeToRivetTunnelMessageKind,
|
|
2417
1806
|
writeToRivetWebSocketClose,
|