@rivetkit/engine-envoy-protocol 0.0.0-http-body-streaming.6d1723c → 0.0.0-http-body-streaming.064e07d
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 +48 -2
- package/dist/index.js +205 -65
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -328,6 +328,20 @@ type SqliteExecuteRequest = {
|
|
|
328
328
|
};
|
|
329
329
|
declare function readSqliteExecuteRequest(bc: bare.ByteCursor): SqliteExecuteRequest;
|
|
330
330
|
declare function writeSqliteExecuteRequest(bc: bare.ByteCursor, x: SqliteExecuteRequest): void;
|
|
331
|
+
type SqliteBatchStatement = {
|
|
332
|
+
readonly sql: string;
|
|
333
|
+
readonly params: readonly SqliteBindParam[] | null;
|
|
334
|
+
};
|
|
335
|
+
declare function readSqliteBatchStatement(bc: bare.ByteCursor): SqliteBatchStatement;
|
|
336
|
+
declare function writeSqliteBatchStatement(bc: bare.ByteCursor, x: SqliteBatchStatement): void;
|
|
337
|
+
type SqliteExecuteBatchRequest = {
|
|
338
|
+
readonly namespaceId: Id;
|
|
339
|
+
readonly actorId: Id;
|
|
340
|
+
readonly generation: SqliteGeneration;
|
|
341
|
+
readonly statements: readonly SqliteBatchStatement[];
|
|
342
|
+
};
|
|
343
|
+
declare function readSqliteExecuteBatchRequest(bc: bare.ByteCursor): SqliteExecuteBatchRequest;
|
|
344
|
+
declare function writeSqliteExecuteBatchRequest(bc: bare.ByteCursor, x: SqliteExecuteBatchRequest): void;
|
|
331
345
|
type SqliteExecOk = {
|
|
332
346
|
readonly result: SqliteQueryResult;
|
|
333
347
|
};
|
|
@@ -338,6 +352,11 @@ type SqliteExecuteOk = {
|
|
|
338
352
|
};
|
|
339
353
|
declare function readSqliteExecuteOk(bc: bare.ByteCursor): SqliteExecuteOk;
|
|
340
354
|
declare function writeSqliteExecuteOk(bc: bare.ByteCursor, x: SqliteExecuteOk): void;
|
|
355
|
+
type SqliteExecuteBatchOk = {
|
|
356
|
+
readonly results: readonly SqliteExecuteResult[];
|
|
357
|
+
};
|
|
358
|
+
declare function readSqliteExecuteBatchOk(bc: bare.ByteCursor): SqliteExecuteBatchOk;
|
|
359
|
+
declare function writeSqliteExecuteBatchOk(bc: bare.ByteCursor, x: SqliteExecuteBatchOk): void;
|
|
341
360
|
type SqliteExecResponse = {
|
|
342
361
|
readonly tag: "SqliteExecOk";
|
|
343
362
|
readonly val: SqliteExecOk;
|
|
@@ -356,6 +375,15 @@ type SqliteExecuteResponse = {
|
|
|
356
375
|
};
|
|
357
376
|
declare function readSqliteExecuteResponse(bc: bare.ByteCursor): SqliteExecuteResponse;
|
|
358
377
|
declare function writeSqliteExecuteResponse(bc: bare.ByteCursor, x: SqliteExecuteResponse): void;
|
|
378
|
+
type SqliteExecuteBatchResponse = {
|
|
379
|
+
readonly tag: "SqliteExecuteBatchOk";
|
|
380
|
+
readonly val: SqliteExecuteBatchOk;
|
|
381
|
+
} | {
|
|
382
|
+
readonly tag: "SqliteErrorResponse";
|
|
383
|
+
readonly val: SqliteErrorResponse;
|
|
384
|
+
};
|
|
385
|
+
declare function readSqliteExecuteBatchResponse(bc: bare.ByteCursor): SqliteExecuteBatchResponse;
|
|
386
|
+
declare function writeSqliteExecuteBatchResponse(bc: bare.ByteCursor, x: SqliteExecuteBatchResponse): void;
|
|
359
387
|
/**
|
|
360
388
|
* Core
|
|
361
389
|
*/
|
|
@@ -785,6 +813,12 @@ type ToRivetSqliteExecuteRequest = {
|
|
|
785
813
|
};
|
|
786
814
|
declare function readToRivetSqliteExecuteRequest(bc: bare.ByteCursor): ToRivetSqliteExecuteRequest;
|
|
787
815
|
declare function writeToRivetSqliteExecuteRequest(bc: bare.ByteCursor, x: ToRivetSqliteExecuteRequest): void;
|
|
816
|
+
type ToRivetSqliteExecuteBatchRequest = {
|
|
817
|
+
readonly requestId: u32;
|
|
818
|
+
readonly data: SqliteExecuteBatchRequest;
|
|
819
|
+
};
|
|
820
|
+
declare function readToRivetSqliteExecuteBatchRequest(bc: bare.ByteCursor): ToRivetSqliteExecuteBatchRequest;
|
|
821
|
+
declare function writeToRivetSqliteExecuteBatchRequest(bc: bare.ByteCursor, x: ToRivetSqliteExecuteBatchRequest): void;
|
|
788
822
|
type ToRivet = {
|
|
789
823
|
readonly tag: "ToRivetMetadata";
|
|
790
824
|
readonly val: ToRivetMetadata;
|
|
@@ -818,6 +852,9 @@ type ToRivet = {
|
|
|
818
852
|
} | {
|
|
819
853
|
readonly tag: "ToRivetSqliteExecuteRequest";
|
|
820
854
|
readonly val: ToRivetSqliteExecuteRequest;
|
|
855
|
+
} | {
|
|
856
|
+
readonly tag: "ToRivetSqliteExecuteBatchRequest";
|
|
857
|
+
readonly val: ToRivetSqliteExecuteBatchRequest;
|
|
821
858
|
};
|
|
822
859
|
declare function readToRivet(bc: bare.ByteCursor): ToRivet;
|
|
823
860
|
declare function writeToRivet(bc: bare.ByteCursor, x: ToRivet): void;
|
|
@@ -876,6 +913,12 @@ type ToEnvoySqliteExecuteResponse = {
|
|
|
876
913
|
};
|
|
877
914
|
declare function readToEnvoySqliteExecuteResponse(bc: bare.ByteCursor): ToEnvoySqliteExecuteResponse;
|
|
878
915
|
declare function writeToEnvoySqliteExecuteResponse(bc: bare.ByteCursor, x: ToEnvoySqliteExecuteResponse): void;
|
|
916
|
+
type ToEnvoySqliteExecuteBatchResponse = {
|
|
917
|
+
readonly requestId: u32;
|
|
918
|
+
readonly data: SqliteExecuteBatchResponse;
|
|
919
|
+
};
|
|
920
|
+
declare function readToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor): ToEnvoySqliteExecuteBatchResponse;
|
|
921
|
+
declare function writeToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor, x: ToEnvoySqliteExecuteBatchResponse): void;
|
|
879
922
|
type ToEnvoy = {
|
|
880
923
|
readonly tag: "ToEnvoyInit";
|
|
881
924
|
readonly val: ToEnvoyInit;
|
|
@@ -906,6 +949,9 @@ type ToEnvoy = {
|
|
|
906
949
|
} | {
|
|
907
950
|
readonly tag: "ToEnvoySqliteExecuteResponse";
|
|
908
951
|
readonly val: ToEnvoySqliteExecuteResponse;
|
|
952
|
+
} | {
|
|
953
|
+
readonly tag: "ToEnvoySqliteExecuteBatchResponse";
|
|
954
|
+
readonly val: ToEnvoySqliteExecuteBatchResponse;
|
|
909
955
|
};
|
|
910
956
|
declare function readToEnvoy(bc: bare.ByteCursor): ToEnvoy;
|
|
911
957
|
declare function writeToEnvoy(bc: bare.ByteCursor, x: ToEnvoy): void;
|
|
@@ -981,6 +1027,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
|
|
|
981
1027
|
declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
|
|
982
1028
|
declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
|
|
983
1029
|
declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
|
|
984
|
-
declare const VERSION =
|
|
1030
|
+
declare const VERSION = 7;
|
|
985
1031
|
|
|
986
|
-
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 HttpStreamAbortReason, HttpStreamAbortReasonKind, 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 SqliteBindParam, type SqliteColumnValue, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteExecOk, type SqliteExecRequest, type SqliteExecResponse, type SqliteExecuteOk, type SqliteExecuteRequest, type SqliteExecuteResponse, type SqliteExecuteResult, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqlitePageBytes, type SqlitePgno, type SqliteQueryResult, type SqliteValueBlob, type SqliteValueFloat, type SqliteValueInteger, type SqliteValueNull, type SqliteValueText, 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 ToEnvoySqliteExecResponse, type ToEnvoySqliteExecuteResponse, 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 ToRivetSqliteExecRequest, type ToRivetSqliteExecuteRequest, 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, readHttpStreamAbortReason, readHttpStreamAbortReasonKind, readId, readJson, readKvDeleteRangeRequest, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readMessageIndex, readPreloadedKv, readPreloadedKvEntry, readProtocolMetadata, readRequestId, readSqliteBindParam, readSqliteColumnValue, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteExecOk, readSqliteExecRequest, readSqliteExecResponse, readSqliteExecuteOk, readSqliteExecuteRequest, readSqliteExecuteResponse, readSqliteExecuteResult, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqlitePageBytes, readSqlitePgno, readSqliteQueryResult, readSqliteValueBlob, readSqliteValueFloat, readSqliteValueInteger, readSqliteValueText, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestAbort, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseAbort, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitRequest, readToRivetSqliteExecRequest, readToRivetSqliteExecuteRequest, 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, writeHttpStreamAbortReason, writeHttpStreamAbortReasonKind, writeId, writeJson, writeKvDeleteRangeRequest, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeMessageIndex, writePreloadedKv, writePreloadedKvEntry, writeProtocolMetadata, writeRequestId, writeSqliteBindParam, writeSqliteColumnValue, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteExecOk, writeSqliteExecRequest, writeSqliteExecResponse, writeSqliteExecuteOk, writeSqliteExecuteRequest, writeSqliteExecuteResponse, writeSqliteExecuteResult, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqlitePageBytes, writeSqlitePgno, writeSqliteQueryResult, writeSqliteValueBlob, writeSqliteValueFloat, writeSqliteValueInteger, writeSqliteValueText, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestAbort, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseAbort, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
|
|
1032
|
+
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 HttpStreamAbortReason, HttpStreamAbortReasonKind, 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 SqliteBatchStatement, type SqliteBindParam, type SqliteColumnValue, type SqliteCommitOk, type SqliteCommitRequest, type SqliteCommitResponse, type SqliteDirtyPage, type SqliteErrorResponse, type SqliteExecOk, type SqliteExecRequest, type SqliteExecResponse, type SqliteExecuteBatchOk, type SqliteExecuteBatchRequest, type SqliteExecuteBatchResponse, type SqliteExecuteOk, type SqliteExecuteRequest, type SqliteExecuteResponse, type SqliteExecuteResult, type SqliteFetchedPage, type SqliteGeneration, type SqliteGetPagesOk, type SqliteGetPagesRequest, type SqliteGetPagesResponse, type SqlitePageBytes, type SqlitePgno, type SqliteQueryResult, type SqliteValueBlob, type SqliteValueFloat, type SqliteValueInteger, type SqliteValueNull, type SqliteValueText, 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 ToEnvoySqliteExecResponse, type ToEnvoySqliteExecuteBatchResponse, type ToEnvoySqliteExecuteResponse, 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 ToRivetSqliteExecRequest, type ToRivetSqliteExecuteBatchRequest, type ToRivetSqliteExecuteRequest, 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, readHttpStreamAbortReason, readHttpStreamAbortReasonKind, readId, readJson, readKvDeleteRangeRequest, readKvDeleteRequest, readKvErrorResponse, readKvGetRequest, readKvGetResponse, readKvKey, readKvListPrefixQuery, readKvListQuery, readKvListRangeQuery, readKvListRequest, readKvListResponse, readKvMetadata, readKvPutRequest, readKvRequestData, readKvResponseData, readKvValue, readMessageId, readMessageIndex, readPreloadedKv, readPreloadedKvEntry, readProtocolMetadata, readRequestId, readSqliteBatchStatement, readSqliteBindParam, readSqliteColumnValue, readSqliteCommitOk, readSqliteCommitRequest, readSqliteCommitResponse, readSqliteDirtyPage, readSqliteErrorResponse, readSqliteExecOk, readSqliteExecRequest, readSqliteExecResponse, readSqliteExecuteBatchOk, readSqliteExecuteBatchRequest, readSqliteExecuteBatchResponse, readSqliteExecuteOk, readSqliteExecuteRequest, readSqliteExecuteResponse, readSqliteExecuteResult, readSqliteFetchedPage, readSqliteGeneration, readSqliteGetPagesOk, readSqliteGetPagesRequest, readSqliteGetPagesResponse, readSqlitePageBytes, readSqlitePgno, readSqliteQueryResult, readSqliteValueBlob, readSqliteValueFloat, readSqliteValueInteger, readSqliteValueText, readStopActorReason, readStopCode, readToEnvoy, readToEnvoyAckEvents, readToEnvoyCommands, readToEnvoyConn, readToEnvoyConnPing, readToEnvoyInit, readToEnvoyKvResponse, readToEnvoyPing, readToEnvoyRequestAbort, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteBatchResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, readToRivetResponseAbort, readToRivetResponseChunk, readToRivetResponseStart, readToRivetSqliteCommitRequest, readToRivetSqliteExecRequest, readToRivetSqliteExecuteBatchRequest, readToRivetSqliteExecuteRequest, 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, writeHttpStreamAbortReason, writeHttpStreamAbortReasonKind, writeId, writeJson, writeKvDeleteRangeRequest, writeKvDeleteRequest, writeKvErrorResponse, writeKvGetRequest, writeKvGetResponse, writeKvKey, writeKvListPrefixQuery, writeKvListQuery, writeKvListRangeQuery, writeKvListRequest, writeKvListResponse, writeKvMetadata, writeKvPutRequest, writeKvRequestData, writeKvResponseData, writeKvValue, writeMessageId, writeMessageIndex, writePreloadedKv, writePreloadedKvEntry, writeProtocolMetadata, writeRequestId, writeSqliteBatchStatement, writeSqliteBindParam, writeSqliteColumnValue, writeSqliteCommitOk, writeSqliteCommitRequest, writeSqliteCommitResponse, writeSqliteDirtyPage, writeSqliteErrorResponse, writeSqliteExecOk, writeSqliteExecRequest, writeSqliteExecResponse, writeSqliteExecuteBatchOk, writeSqliteExecuteBatchRequest, writeSqliteExecuteBatchResponse, writeSqliteExecuteOk, writeSqliteExecuteRequest, writeSqliteExecuteResponse, writeSqliteExecuteResult, writeSqliteFetchedPage, writeSqliteGeneration, writeSqliteGetPagesOk, writeSqliteGetPagesRequest, writeSqliteGetPagesResponse, writeSqlitePageBytes, writeSqlitePgno, writeSqliteQueryResult, writeSqliteValueBlob, writeSqliteValueFloat, writeSqliteValueInteger, writeSqliteValueText, writeStopActorReason, writeStopCode, writeToEnvoy, writeToEnvoyAckEvents, writeToEnvoyCommands, writeToEnvoyConn, writeToEnvoyConnPing, writeToEnvoyInit, writeToEnvoyKvResponse, writeToEnvoyPing, writeToEnvoyRequestAbort, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteBatchResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseAbort, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteBatchRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
|
package/dist/index.js
CHANGED
|
@@ -853,6 +853,47 @@ function writeSqliteExecuteRequest(bc, x) {
|
|
|
853
853
|
bare.writeString(bc, x.sql);
|
|
854
854
|
write14(bc, x.params);
|
|
855
855
|
}
|
|
856
|
+
function readSqliteBatchStatement(bc) {
|
|
857
|
+
return {
|
|
858
|
+
sql: bare.readString(bc),
|
|
859
|
+
params: read14(bc)
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
function writeSqliteBatchStatement(bc, x) {
|
|
863
|
+
bare.writeString(bc, x.sql);
|
|
864
|
+
write14(bc, x.params);
|
|
865
|
+
}
|
|
866
|
+
function read15(bc) {
|
|
867
|
+
const len = bare.readUintSafe(bc);
|
|
868
|
+
if (len === 0) {
|
|
869
|
+
return [];
|
|
870
|
+
}
|
|
871
|
+
const result = [readSqliteBatchStatement(bc)];
|
|
872
|
+
for (let i = 1; i < len; i++) {
|
|
873
|
+
result[i] = readSqliteBatchStatement(bc);
|
|
874
|
+
}
|
|
875
|
+
return result;
|
|
876
|
+
}
|
|
877
|
+
function write15(bc, x) {
|
|
878
|
+
bare.writeUintSafe(bc, x.length);
|
|
879
|
+
for (let i = 0; i < x.length; i++) {
|
|
880
|
+
writeSqliteBatchStatement(bc, x[i]);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
function readSqliteExecuteBatchRequest(bc) {
|
|
884
|
+
return {
|
|
885
|
+
namespaceId: readId(bc),
|
|
886
|
+
actorId: readId(bc),
|
|
887
|
+
generation: readSqliteGeneration(bc),
|
|
888
|
+
statements: read15(bc)
|
|
889
|
+
};
|
|
890
|
+
}
|
|
891
|
+
function writeSqliteExecuteBatchRequest(bc, x) {
|
|
892
|
+
writeId(bc, x.namespaceId);
|
|
893
|
+
writeId(bc, x.actorId);
|
|
894
|
+
writeSqliteGeneration(bc, x.generation);
|
|
895
|
+
write15(bc, x.statements);
|
|
896
|
+
}
|
|
856
897
|
function readSqliteExecOk(bc) {
|
|
857
898
|
return {
|
|
858
899
|
result: readSqliteQueryResult(bc)
|
|
@@ -869,6 +910,31 @@ function readSqliteExecuteOk(bc) {
|
|
|
869
910
|
function writeSqliteExecuteOk(bc, x) {
|
|
870
911
|
writeSqliteExecuteResult(bc, x.result);
|
|
871
912
|
}
|
|
913
|
+
function read16(bc) {
|
|
914
|
+
const len = bare.readUintSafe(bc);
|
|
915
|
+
if (len === 0) {
|
|
916
|
+
return [];
|
|
917
|
+
}
|
|
918
|
+
const result = [readSqliteExecuteResult(bc)];
|
|
919
|
+
for (let i = 1; i < len; i++) {
|
|
920
|
+
result[i] = readSqliteExecuteResult(bc);
|
|
921
|
+
}
|
|
922
|
+
return result;
|
|
923
|
+
}
|
|
924
|
+
function write16(bc, x) {
|
|
925
|
+
bare.writeUintSafe(bc, x.length);
|
|
926
|
+
for (let i = 0; i < x.length; i++) {
|
|
927
|
+
writeSqliteExecuteResult(bc, x[i]);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
function readSqliteExecuteBatchOk(bc) {
|
|
931
|
+
return {
|
|
932
|
+
results: read16(bc)
|
|
933
|
+
};
|
|
934
|
+
}
|
|
935
|
+
function writeSqliteExecuteBatchOk(bc, x) {
|
|
936
|
+
write16(bc, x.results);
|
|
937
|
+
}
|
|
872
938
|
function readSqliteExecResponse(bc) {
|
|
873
939
|
const offset = bc.offset;
|
|
874
940
|
const tag = bare.readU8(bc);
|
|
@@ -925,6 +991,34 @@ function writeSqliteExecuteResponse(bc, x) {
|
|
|
925
991
|
}
|
|
926
992
|
}
|
|
927
993
|
}
|
|
994
|
+
function readSqliteExecuteBatchResponse(bc) {
|
|
995
|
+
const offset = bc.offset;
|
|
996
|
+
const tag = bare.readU8(bc);
|
|
997
|
+
switch (tag) {
|
|
998
|
+
case 0:
|
|
999
|
+
return { tag: "SqliteExecuteBatchOk", val: readSqliteExecuteBatchOk(bc) };
|
|
1000
|
+
case 1:
|
|
1001
|
+
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
1002
|
+
default: {
|
|
1003
|
+
bc.offset = offset;
|
|
1004
|
+
throw new bare.BareError(offset, "invalid tag");
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
function writeSqliteExecuteBatchResponse(bc, x) {
|
|
1009
|
+
switch (x.tag) {
|
|
1010
|
+
case "SqliteExecuteBatchOk": {
|
|
1011
|
+
bare.writeU8(bc, 0);
|
|
1012
|
+
writeSqliteExecuteBatchOk(bc, x.val);
|
|
1013
|
+
break;
|
|
1014
|
+
}
|
|
1015
|
+
case "SqliteErrorResponse": {
|
|
1016
|
+
bare.writeU8(bc, 1);
|
|
1017
|
+
writeSqliteErrorResponse(bc, x.val);
|
|
1018
|
+
break;
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
928
1022
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
929
1023
|
StopCode2["Ok"] = "Ok";
|
|
930
1024
|
StopCode2["Error"] = "Error";
|
|
@@ -964,19 +1058,19 @@ function readActorName(bc) {
|
|
|
964
1058
|
function writeActorName(bc, x) {
|
|
965
1059
|
writeJson(bc, x.metadata);
|
|
966
1060
|
}
|
|
967
|
-
function
|
|
1061
|
+
function read17(bc) {
|
|
968
1062
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
969
1063
|
}
|
|
970
|
-
function
|
|
1064
|
+
function write17(bc, x) {
|
|
971
1065
|
bare.writeBool(bc, x != null);
|
|
972
1066
|
if (x != null) {
|
|
973
1067
|
bare.writeString(bc, x);
|
|
974
1068
|
}
|
|
975
1069
|
}
|
|
976
|
-
function
|
|
1070
|
+
function read18(bc) {
|
|
977
1071
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
978
1072
|
}
|
|
979
|
-
function
|
|
1073
|
+
function write18(bc, x) {
|
|
980
1074
|
bare.writeBool(bc, x != null);
|
|
981
1075
|
if (x != null) {
|
|
982
1076
|
bare.writeData(bc, x);
|
|
@@ -985,16 +1079,16 @@ function write16(bc, x) {
|
|
|
985
1079
|
function readActorConfig(bc) {
|
|
986
1080
|
return {
|
|
987
1081
|
name: bare.readString(bc),
|
|
988
|
-
key:
|
|
1082
|
+
key: read17(bc),
|
|
989
1083
|
createTs: bare.readI64(bc),
|
|
990
|
-
input:
|
|
1084
|
+
input: read18(bc)
|
|
991
1085
|
};
|
|
992
1086
|
}
|
|
993
1087
|
function writeActorConfig(bc, x) {
|
|
994
1088
|
bare.writeString(bc, x.name);
|
|
995
|
-
|
|
1089
|
+
write17(bc, x.key);
|
|
996
1090
|
bare.writeI64(bc, x.createTs);
|
|
997
|
-
|
|
1091
|
+
write18(bc, x.input);
|
|
998
1092
|
}
|
|
999
1093
|
function readActorCheckpoint(bc) {
|
|
1000
1094
|
return {
|
|
@@ -1037,12 +1131,12 @@ function writeActorIntent(bc, x) {
|
|
|
1037
1131
|
function readActorStateStopped(bc) {
|
|
1038
1132
|
return {
|
|
1039
1133
|
code: readStopCode(bc),
|
|
1040
|
-
message:
|
|
1134
|
+
message: read17(bc)
|
|
1041
1135
|
};
|
|
1042
1136
|
}
|
|
1043
1137
|
function writeActorStateStopped(bc, x) {
|
|
1044
1138
|
writeStopCode(bc, x.code);
|
|
1045
|
-
|
|
1139
|
+
write17(bc, x.message);
|
|
1046
1140
|
}
|
|
1047
1141
|
function readActorState(bc) {
|
|
1048
1142
|
const offset = bc.offset;
|
|
@@ -1152,7 +1246,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
1152
1246
|
writeKvValue(bc, x.value);
|
|
1153
1247
|
writeKvMetadata(bc, x.metadata);
|
|
1154
1248
|
}
|
|
1155
|
-
function
|
|
1249
|
+
function read19(bc) {
|
|
1156
1250
|
const len = bare.readUintSafe(bc);
|
|
1157
1251
|
if (len === 0) {
|
|
1158
1252
|
return [];
|
|
@@ -1163,7 +1257,7 @@ function read17(bc) {
|
|
|
1163
1257
|
}
|
|
1164
1258
|
return result;
|
|
1165
1259
|
}
|
|
1166
|
-
function
|
|
1260
|
+
function write19(bc, x) {
|
|
1167
1261
|
bare.writeUintSafe(bc, x.length);
|
|
1168
1262
|
for (let i = 0; i < x.length; i++) {
|
|
1169
1263
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -1171,13 +1265,13 @@ function write17(bc, x) {
|
|
|
1171
1265
|
}
|
|
1172
1266
|
function readPreloadedKv(bc) {
|
|
1173
1267
|
return {
|
|
1174
|
-
entries:
|
|
1268
|
+
entries: read19(bc),
|
|
1175
1269
|
requestedGetKeys: read0(bc),
|
|
1176
1270
|
requestedPrefixes: read0(bc)
|
|
1177
1271
|
};
|
|
1178
1272
|
}
|
|
1179
1273
|
function writePreloadedKv(bc, x) {
|
|
1180
|
-
|
|
1274
|
+
write19(bc, x.entries);
|
|
1181
1275
|
write0(bc, x.requestedGetKeys);
|
|
1182
1276
|
write0(bc, x.requestedPrefixes);
|
|
1183
1277
|
}
|
|
@@ -1191,7 +1285,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
1191
1285
|
writeGatewayId(bc, x.gatewayId);
|
|
1192
1286
|
writeRequestId(bc, x.requestId);
|
|
1193
1287
|
}
|
|
1194
|
-
function
|
|
1288
|
+
function read20(bc) {
|
|
1195
1289
|
const len = bare.readUintSafe(bc);
|
|
1196
1290
|
if (len === 0) {
|
|
1197
1291
|
return [];
|
|
@@ -1202,16 +1296,16 @@ function read18(bc) {
|
|
|
1202
1296
|
}
|
|
1203
1297
|
return result;
|
|
1204
1298
|
}
|
|
1205
|
-
function
|
|
1299
|
+
function write20(bc, x) {
|
|
1206
1300
|
bare.writeUintSafe(bc, x.length);
|
|
1207
1301
|
for (let i = 0; i < x.length; i++) {
|
|
1208
1302
|
writeHibernatingRequest(bc, x[i]);
|
|
1209
1303
|
}
|
|
1210
1304
|
}
|
|
1211
|
-
function
|
|
1305
|
+
function read21(bc) {
|
|
1212
1306
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
1213
1307
|
}
|
|
1214
|
-
function
|
|
1308
|
+
function write21(bc, x) {
|
|
1215
1309
|
bare.writeBool(bc, x != null);
|
|
1216
1310
|
if (x != null) {
|
|
1217
1311
|
writePreloadedKv(bc, x);
|
|
@@ -1220,14 +1314,14 @@ function write19(bc, x) {
|
|
|
1220
1314
|
function readCommandStartActor(bc) {
|
|
1221
1315
|
return {
|
|
1222
1316
|
config: readActorConfig(bc),
|
|
1223
|
-
hibernatingRequests:
|
|
1224
|
-
preloadedKv:
|
|
1317
|
+
hibernatingRequests: read20(bc),
|
|
1318
|
+
preloadedKv: read21(bc)
|
|
1225
1319
|
};
|
|
1226
1320
|
}
|
|
1227
1321
|
function writeCommandStartActor(bc, x) {
|
|
1228
1322
|
writeActorConfig(bc, x.config);
|
|
1229
|
-
|
|
1230
|
-
|
|
1323
|
+
write20(bc, x.hibernatingRequests);
|
|
1324
|
+
write21(bc, x.preloadedKv);
|
|
1231
1325
|
}
|
|
1232
1326
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
1233
1327
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -1384,7 +1478,7 @@ function writeMessageId(bc, x) {
|
|
|
1384
1478
|
writeRequestId(bc, x.requestId);
|
|
1385
1479
|
writeMessageIndex(bc, x.messageIndex);
|
|
1386
1480
|
}
|
|
1387
|
-
function
|
|
1481
|
+
function read22(bc) {
|
|
1388
1482
|
const len = bare.readUintSafe(bc);
|
|
1389
1483
|
const result = /* @__PURE__ */ new Map();
|
|
1390
1484
|
for (let i = 0; i < len; i++) {
|
|
@@ -1398,7 +1492,7 @@ function read20(bc) {
|
|
|
1398
1492
|
}
|
|
1399
1493
|
return result;
|
|
1400
1494
|
}
|
|
1401
|
-
function
|
|
1495
|
+
function write22(bc, x) {
|
|
1402
1496
|
bare.writeUintSafe(bc, x.size);
|
|
1403
1497
|
for (const kv of x) {
|
|
1404
1498
|
bare.writeString(bc, kv[0]);
|
|
@@ -1410,8 +1504,8 @@ function readToEnvoyRequestStart(bc) {
|
|
|
1410
1504
|
actorId: readId(bc),
|
|
1411
1505
|
method: bare.readString(bc),
|
|
1412
1506
|
path: bare.readString(bc),
|
|
1413
|
-
headers:
|
|
1414
|
-
body:
|
|
1507
|
+
headers: read22(bc),
|
|
1508
|
+
body: read18(bc),
|
|
1415
1509
|
stream: bare.readBool(bc)
|
|
1416
1510
|
};
|
|
1417
1511
|
}
|
|
@@ -1419,8 +1513,8 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
1419
1513
|
writeId(bc, x.actorId);
|
|
1420
1514
|
bare.writeString(bc, x.method);
|
|
1421
1515
|
bare.writeString(bc, x.path);
|
|
1422
|
-
|
|
1423
|
-
|
|
1516
|
+
write22(bc, x.headers);
|
|
1517
|
+
write18(bc, x.body);
|
|
1424
1518
|
bare.writeBool(bc, x.stream);
|
|
1425
1519
|
}
|
|
1426
1520
|
function readToEnvoyRequestChunk(bc) {
|
|
@@ -1516,12 +1610,12 @@ function writeHttpStreamAbortReasonKind(bc, x) {
|
|
|
1516
1610
|
function readHttpStreamAbortReason(bc) {
|
|
1517
1611
|
return {
|
|
1518
1612
|
kind: readHttpStreamAbortReasonKind(bc),
|
|
1519
|
-
detail:
|
|
1613
|
+
detail: read17(bc)
|
|
1520
1614
|
};
|
|
1521
1615
|
}
|
|
1522
1616
|
function writeHttpStreamAbortReason(bc, x) {
|
|
1523
1617
|
writeHttpStreamAbortReasonKind(bc, x.kind);
|
|
1524
|
-
|
|
1618
|
+
write17(bc, x.detail);
|
|
1525
1619
|
}
|
|
1526
1620
|
function readToEnvoyRequestAbort(bc) {
|
|
1527
1621
|
return {
|
|
@@ -1534,15 +1628,15 @@ function writeToEnvoyRequestAbort(bc, x) {
|
|
|
1534
1628
|
function readToRivetResponseStart(bc) {
|
|
1535
1629
|
return {
|
|
1536
1630
|
status: bare.readU16(bc),
|
|
1537
|
-
headers:
|
|
1538
|
-
body:
|
|
1631
|
+
headers: read22(bc),
|
|
1632
|
+
body: read18(bc),
|
|
1539
1633
|
stream: bare.readBool(bc)
|
|
1540
1634
|
};
|
|
1541
1635
|
}
|
|
1542
1636
|
function writeToRivetResponseStart(bc, x) {
|
|
1543
1637
|
bare.writeU16(bc, x.status);
|
|
1544
|
-
|
|
1545
|
-
|
|
1638
|
+
write22(bc, x.headers);
|
|
1639
|
+
write18(bc, x.body);
|
|
1546
1640
|
bare.writeBool(bc, x.stream);
|
|
1547
1641
|
}
|
|
1548
1642
|
function readToRivetResponseChunk(bc) {
|
|
@@ -1567,13 +1661,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
1567
1661
|
return {
|
|
1568
1662
|
actorId: readId(bc),
|
|
1569
1663
|
path: bare.readString(bc),
|
|
1570
|
-
headers:
|
|
1664
|
+
headers: read22(bc)
|
|
1571
1665
|
};
|
|
1572
1666
|
}
|
|
1573
1667
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
1574
1668
|
writeId(bc, x.actorId);
|
|
1575
1669
|
bare.writeString(bc, x.path);
|
|
1576
|
-
|
|
1670
|
+
write22(bc, x.headers);
|
|
1577
1671
|
}
|
|
1578
1672
|
function readToEnvoyWebSocketMessage(bc) {
|
|
1579
1673
|
return {
|
|
@@ -1585,10 +1679,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
1585
1679
|
bare.writeData(bc, x.data);
|
|
1586
1680
|
bare.writeBool(bc, x.binary);
|
|
1587
1681
|
}
|
|
1588
|
-
function
|
|
1682
|
+
function read23(bc) {
|
|
1589
1683
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1590
1684
|
}
|
|
1591
|
-
function
|
|
1685
|
+
function write23(bc, x) {
|
|
1592
1686
|
bare.writeBool(bc, x != null);
|
|
1593
1687
|
if (x != null) {
|
|
1594
1688
|
bare.writeU16(bc, x);
|
|
@@ -1596,13 +1690,13 @@ function write21(bc, x) {
|
|
|
1596
1690
|
}
|
|
1597
1691
|
function readToEnvoyWebSocketClose(bc) {
|
|
1598
1692
|
return {
|
|
1599
|
-
code:
|
|
1600
|
-
reason:
|
|
1693
|
+
code: read23(bc),
|
|
1694
|
+
reason: read17(bc)
|
|
1601
1695
|
};
|
|
1602
1696
|
}
|
|
1603
1697
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
1604
|
-
|
|
1605
|
-
|
|
1698
|
+
write23(bc, x.code);
|
|
1699
|
+
write17(bc, x.reason);
|
|
1606
1700
|
}
|
|
1607
1701
|
function readToRivetWebSocketOpen(bc) {
|
|
1608
1702
|
return {
|
|
@@ -1632,14 +1726,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
1632
1726
|
}
|
|
1633
1727
|
function readToRivetWebSocketClose(bc) {
|
|
1634
1728
|
return {
|
|
1635
|
-
code:
|
|
1636
|
-
reason:
|
|
1729
|
+
code: read23(bc),
|
|
1730
|
+
reason: read17(bc),
|
|
1637
1731
|
hibernate: bare.readBool(bc)
|
|
1638
1732
|
};
|
|
1639
1733
|
}
|
|
1640
1734
|
function writeToRivetWebSocketClose(bc, x) {
|
|
1641
|
-
|
|
1642
|
-
|
|
1735
|
+
write23(bc, x.code);
|
|
1736
|
+
write17(bc, x.reason);
|
|
1643
1737
|
bare.writeBool(bc, x.hibernate);
|
|
1644
1738
|
}
|
|
1645
1739
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1789,7 +1883,7 @@ function readToEnvoyPing(bc) {
|
|
|
1789
1883
|
function writeToEnvoyPing(bc, x) {
|
|
1790
1884
|
bare.writeI64(bc, x.ts);
|
|
1791
1885
|
}
|
|
1792
|
-
function
|
|
1886
|
+
function read24(bc) {
|
|
1793
1887
|
const len = bare.readUintSafe(bc);
|
|
1794
1888
|
const result = /* @__PURE__ */ new Map();
|
|
1795
1889
|
for (let i = 0; i < len; i++) {
|
|
@@ -1803,26 +1897,26 @@ function read22(bc) {
|
|
|
1803
1897
|
}
|
|
1804
1898
|
return result;
|
|
1805
1899
|
}
|
|
1806
|
-
function
|
|
1900
|
+
function write24(bc, x) {
|
|
1807
1901
|
bare.writeUintSafe(bc, x.size);
|
|
1808
1902
|
for (const kv of x) {
|
|
1809
1903
|
bare.writeString(bc, kv[0]);
|
|
1810
1904
|
writeActorName(bc, kv[1]);
|
|
1811
1905
|
}
|
|
1812
1906
|
}
|
|
1813
|
-
function
|
|
1814
|
-
return bare.readBool(bc) ?
|
|
1907
|
+
function read25(bc) {
|
|
1908
|
+
return bare.readBool(bc) ? read24(bc) : null;
|
|
1815
1909
|
}
|
|
1816
|
-
function
|
|
1910
|
+
function write25(bc, x) {
|
|
1817
1911
|
bare.writeBool(bc, x != null);
|
|
1818
1912
|
if (x != null) {
|
|
1819
|
-
|
|
1913
|
+
write24(bc, x);
|
|
1820
1914
|
}
|
|
1821
1915
|
}
|
|
1822
|
-
function
|
|
1916
|
+
function read26(bc) {
|
|
1823
1917
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1824
1918
|
}
|
|
1825
|
-
function
|
|
1919
|
+
function write26(bc, x) {
|
|
1826
1920
|
bare.writeBool(bc, x != null);
|
|
1827
1921
|
if (x != null) {
|
|
1828
1922
|
writeJson(bc, x);
|
|
@@ -1830,13 +1924,13 @@ function write24(bc, x) {
|
|
|
1830
1924
|
}
|
|
1831
1925
|
function readToRivetMetadata(bc) {
|
|
1832
1926
|
return {
|
|
1833
|
-
prepopulateActorNames:
|
|
1834
|
-
metadata:
|
|
1927
|
+
prepopulateActorNames: read25(bc),
|
|
1928
|
+
metadata: read26(bc)
|
|
1835
1929
|
};
|
|
1836
1930
|
}
|
|
1837
1931
|
function writeToRivetMetadata(bc, x) {
|
|
1838
|
-
|
|
1839
|
-
|
|
1932
|
+
write25(bc, x.prepopulateActorNames);
|
|
1933
|
+
write26(bc, x.metadata);
|
|
1840
1934
|
}
|
|
1841
1935
|
function readToRivetEvents(bc) {
|
|
1842
1936
|
const len = bare.readUintSafe(bc);
|
|
@@ -1855,7 +1949,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1855
1949
|
writeEventWrapper(bc, x[i]);
|
|
1856
1950
|
}
|
|
1857
1951
|
}
|
|
1858
|
-
function
|
|
1952
|
+
function read27(bc) {
|
|
1859
1953
|
const len = bare.readUintSafe(bc);
|
|
1860
1954
|
if (len === 0) {
|
|
1861
1955
|
return [];
|
|
@@ -1866,7 +1960,7 @@ function read25(bc) {
|
|
|
1866
1960
|
}
|
|
1867
1961
|
return result;
|
|
1868
1962
|
}
|
|
1869
|
-
function
|
|
1963
|
+
function write27(bc, x) {
|
|
1870
1964
|
bare.writeUintSafe(bc, x.length);
|
|
1871
1965
|
for (let i = 0; i < x.length; i++) {
|
|
1872
1966
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1874,11 +1968,11 @@ function write25(bc, x) {
|
|
|
1874
1968
|
}
|
|
1875
1969
|
function readToRivetAckCommands(bc) {
|
|
1876
1970
|
return {
|
|
1877
|
-
lastCommandCheckpoints:
|
|
1971
|
+
lastCommandCheckpoints: read27(bc)
|
|
1878
1972
|
};
|
|
1879
1973
|
}
|
|
1880
1974
|
function writeToRivetAckCommands(bc, x) {
|
|
1881
|
-
|
|
1975
|
+
write27(bc, x.lastCommandCheckpoints);
|
|
1882
1976
|
}
|
|
1883
1977
|
function readToRivetPong(bc) {
|
|
1884
1978
|
return {
|
|
@@ -1940,6 +2034,16 @@ function writeToRivetSqliteExecuteRequest(bc, x) {
|
|
|
1940
2034
|
bare.writeU32(bc, x.requestId);
|
|
1941
2035
|
writeSqliteExecuteRequest(bc, x.data);
|
|
1942
2036
|
}
|
|
2037
|
+
function readToRivetSqliteExecuteBatchRequest(bc) {
|
|
2038
|
+
return {
|
|
2039
|
+
requestId: bare.readU32(bc),
|
|
2040
|
+
data: readSqliteExecuteBatchRequest(bc)
|
|
2041
|
+
};
|
|
2042
|
+
}
|
|
2043
|
+
function writeToRivetSqliteExecuteBatchRequest(bc, x) {
|
|
2044
|
+
bare.writeU32(bc, x.requestId);
|
|
2045
|
+
writeSqliteExecuteBatchRequest(bc, x.data);
|
|
2046
|
+
}
|
|
1943
2047
|
function readToRivet(bc) {
|
|
1944
2048
|
const offset = bc.offset;
|
|
1945
2049
|
const tag = bare.readU8(bc);
|
|
@@ -1966,6 +2070,8 @@ function readToRivet(bc) {
|
|
|
1966
2070
|
return { tag: "ToRivetSqliteExecRequest", val: readToRivetSqliteExecRequest(bc) };
|
|
1967
2071
|
case 10:
|
|
1968
2072
|
return { tag: "ToRivetSqliteExecuteRequest", val: readToRivetSqliteExecuteRequest(bc) };
|
|
2073
|
+
case 11:
|
|
2074
|
+
return { tag: "ToRivetSqliteExecuteBatchRequest", val: readToRivetSqliteExecuteBatchRequest(bc) };
|
|
1969
2075
|
default: {
|
|
1970
2076
|
bc.offset = offset;
|
|
1971
2077
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -2028,6 +2134,11 @@ function writeToRivet(bc, x) {
|
|
|
2028
2134
|
writeToRivetSqliteExecuteRequest(bc, x.val);
|
|
2029
2135
|
break;
|
|
2030
2136
|
}
|
|
2137
|
+
case "ToRivetSqliteExecuteBatchRequest": {
|
|
2138
|
+
bare.writeU8(bc, 11);
|
|
2139
|
+
writeToRivetSqliteExecuteBatchRequest(bc, x.val);
|
|
2140
|
+
break;
|
|
2141
|
+
}
|
|
2031
2142
|
}
|
|
2032
2143
|
}
|
|
2033
2144
|
function encodeToRivet(x, config) {
|
|
@@ -2086,11 +2197,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
2086
2197
|
}
|
|
2087
2198
|
function readToEnvoyAckEvents(bc) {
|
|
2088
2199
|
return {
|
|
2089
|
-
lastEventCheckpoints:
|
|
2200
|
+
lastEventCheckpoints: read27(bc)
|
|
2090
2201
|
};
|
|
2091
2202
|
}
|
|
2092
2203
|
function writeToEnvoyAckEvents(bc, x) {
|
|
2093
|
-
|
|
2204
|
+
write27(bc, x.lastEventCheckpoints);
|
|
2094
2205
|
}
|
|
2095
2206
|
function readToEnvoyKvResponse(bc) {
|
|
2096
2207
|
return {
|
|
@@ -2142,6 +2253,16 @@ function writeToEnvoySqliteExecuteResponse(bc, x) {
|
|
|
2142
2253
|
bare.writeU32(bc, x.requestId);
|
|
2143
2254
|
writeSqliteExecuteResponse(bc, x.data);
|
|
2144
2255
|
}
|
|
2256
|
+
function readToEnvoySqliteExecuteBatchResponse(bc) {
|
|
2257
|
+
return {
|
|
2258
|
+
requestId: bare.readU32(bc),
|
|
2259
|
+
data: readSqliteExecuteBatchResponse(bc)
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
function writeToEnvoySqliteExecuteBatchResponse(bc, x) {
|
|
2263
|
+
bare.writeU32(bc, x.requestId);
|
|
2264
|
+
writeSqliteExecuteBatchResponse(bc, x.data);
|
|
2265
|
+
}
|
|
2145
2266
|
function readToEnvoy(bc) {
|
|
2146
2267
|
const offset = bc.offset;
|
|
2147
2268
|
const tag = bare.readU8(bc);
|
|
@@ -2166,6 +2287,8 @@ function readToEnvoy(bc) {
|
|
|
2166
2287
|
return { tag: "ToEnvoySqliteExecResponse", val: readToEnvoySqliteExecResponse(bc) };
|
|
2167
2288
|
case 9:
|
|
2168
2289
|
return { tag: "ToEnvoySqliteExecuteResponse", val: readToEnvoySqliteExecuteResponse(bc) };
|
|
2290
|
+
case 10:
|
|
2291
|
+
return { tag: "ToEnvoySqliteExecuteBatchResponse", val: readToEnvoySqliteExecuteBatchResponse(bc) };
|
|
2169
2292
|
default: {
|
|
2170
2293
|
bc.offset = offset;
|
|
2171
2294
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -2224,6 +2347,11 @@ function writeToEnvoy(bc, x) {
|
|
|
2224
2347
|
writeToEnvoySqliteExecuteResponse(bc, x.val);
|
|
2225
2348
|
break;
|
|
2226
2349
|
}
|
|
2350
|
+
case "ToEnvoySqliteExecuteBatchResponse": {
|
|
2351
|
+
bare.writeU8(bc, 10);
|
|
2352
|
+
writeToEnvoySqliteExecuteBatchResponse(bc, x.val);
|
|
2353
|
+
break;
|
|
2354
|
+
}
|
|
2227
2355
|
}
|
|
2228
2356
|
}
|
|
2229
2357
|
function encodeToEnvoy(x, config) {
|
|
@@ -2430,7 +2558,7 @@ function decodeToOutbound(bytes) {
|
|
|
2430
2558
|
function assert(condition, message) {
|
|
2431
2559
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
2432
2560
|
}
|
|
2433
|
-
var VERSION =
|
|
2561
|
+
var VERSION = 7;
|
|
2434
2562
|
export {
|
|
2435
2563
|
HttpStreamAbortReasonKind,
|
|
2436
2564
|
StopActorReason,
|
|
@@ -2492,6 +2620,7 @@ export {
|
|
|
2492
2620
|
readPreloadedKvEntry,
|
|
2493
2621
|
readProtocolMetadata,
|
|
2494
2622
|
readRequestId,
|
|
2623
|
+
readSqliteBatchStatement,
|
|
2495
2624
|
readSqliteBindParam,
|
|
2496
2625
|
readSqliteColumnValue,
|
|
2497
2626
|
readSqliteCommitOk,
|
|
@@ -2502,6 +2631,9 @@ export {
|
|
|
2502
2631
|
readSqliteExecOk,
|
|
2503
2632
|
readSqliteExecRequest,
|
|
2504
2633
|
readSqliteExecResponse,
|
|
2634
|
+
readSqliteExecuteBatchOk,
|
|
2635
|
+
readSqliteExecuteBatchRequest,
|
|
2636
|
+
readSqliteExecuteBatchResponse,
|
|
2505
2637
|
readSqliteExecuteOk,
|
|
2506
2638
|
readSqliteExecuteRequest,
|
|
2507
2639
|
readSqliteExecuteResponse,
|
|
@@ -2533,6 +2665,7 @@ export {
|
|
|
2533
2665
|
readToEnvoyRequestStart,
|
|
2534
2666
|
readToEnvoySqliteCommitResponse,
|
|
2535
2667
|
readToEnvoySqliteExecResponse,
|
|
2668
|
+
readToEnvoySqliteExecuteBatchResponse,
|
|
2536
2669
|
readToEnvoySqliteExecuteResponse,
|
|
2537
2670
|
readToEnvoySqliteGetPagesResponse,
|
|
2538
2671
|
readToEnvoyTunnelMessage,
|
|
@@ -2555,6 +2688,7 @@ export {
|
|
|
2555
2688
|
readToRivetResponseStart,
|
|
2556
2689
|
readToRivetSqliteCommitRequest,
|
|
2557
2690
|
readToRivetSqliteExecRequest,
|
|
2691
|
+
readToRivetSqliteExecuteBatchRequest,
|
|
2558
2692
|
readToRivetSqliteExecuteRequest,
|
|
2559
2693
|
readToRivetSqliteGetPagesRequest,
|
|
2560
2694
|
readToRivetTunnelMessage,
|
|
@@ -2607,6 +2741,7 @@ export {
|
|
|
2607
2741
|
writePreloadedKvEntry,
|
|
2608
2742
|
writeProtocolMetadata,
|
|
2609
2743
|
writeRequestId,
|
|
2744
|
+
writeSqliteBatchStatement,
|
|
2610
2745
|
writeSqliteBindParam,
|
|
2611
2746
|
writeSqliteColumnValue,
|
|
2612
2747
|
writeSqliteCommitOk,
|
|
@@ -2617,6 +2752,9 @@ export {
|
|
|
2617
2752
|
writeSqliteExecOk,
|
|
2618
2753
|
writeSqliteExecRequest,
|
|
2619
2754
|
writeSqliteExecResponse,
|
|
2755
|
+
writeSqliteExecuteBatchOk,
|
|
2756
|
+
writeSqliteExecuteBatchRequest,
|
|
2757
|
+
writeSqliteExecuteBatchResponse,
|
|
2620
2758
|
writeSqliteExecuteOk,
|
|
2621
2759
|
writeSqliteExecuteRequest,
|
|
2622
2760
|
writeSqliteExecuteResponse,
|
|
@@ -2648,6 +2786,7 @@ export {
|
|
|
2648
2786
|
writeToEnvoyRequestStart,
|
|
2649
2787
|
writeToEnvoySqliteCommitResponse,
|
|
2650
2788
|
writeToEnvoySqliteExecResponse,
|
|
2789
|
+
writeToEnvoySqliteExecuteBatchResponse,
|
|
2651
2790
|
writeToEnvoySqliteExecuteResponse,
|
|
2652
2791
|
writeToEnvoySqliteGetPagesResponse,
|
|
2653
2792
|
writeToEnvoyTunnelMessage,
|
|
@@ -2670,6 +2809,7 @@ export {
|
|
|
2670
2809
|
writeToRivetResponseStart,
|
|
2671
2810
|
writeToRivetSqliteCommitRequest,
|
|
2672
2811
|
writeToRivetSqliteExecRequest,
|
|
2812
|
+
writeToRivetSqliteExecuteBatchRequest,
|
|
2673
2813
|
writeToRivetSqliteExecuteRequest,
|
|
2674
2814
|
writeToRivetSqliteGetPagesRequest,
|
|
2675
2815
|
writeToRivetTunnelMessage,
|