@rivetkit/engine-envoy-protocol 0.0.0-skip-ready-wait-flatten-client-options.1cae221 → 0.0.0-sql-metrics.eac581d
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 +56 -3
- package/dist/index.js +222 -65
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -196,10 +196,13 @@ declare function readSqliteGetPagesRequest(bc: bare.ByteCursor): SqliteGetPagesR
|
|
|
196
196
|
declare function writeSqliteGetPagesRequest(bc: bare.ByteCursor, x: SqliteGetPagesRequest): void;
|
|
197
197
|
type SqliteGetPagesOk = {
|
|
198
198
|
readonly pages: readonly SqliteFetchedPage[];
|
|
199
|
+
readonly headTxid: u64 | null;
|
|
199
200
|
};
|
|
200
201
|
declare function readSqliteGetPagesOk(bc: bare.ByteCursor): SqliteGetPagesOk;
|
|
201
202
|
declare function writeSqliteGetPagesOk(bc: bare.ByteCursor, x: SqliteGetPagesOk): void;
|
|
202
203
|
type SqliteErrorResponse = {
|
|
204
|
+
readonly group: string;
|
|
205
|
+
readonly code: string;
|
|
203
206
|
readonly message: string;
|
|
204
207
|
};
|
|
205
208
|
declare function readSqliteErrorResponse(bc: bare.ByteCursor): SqliteErrorResponse;
|
|
@@ -223,7 +226,11 @@ type SqliteCommitRequest = {
|
|
|
223
226
|
};
|
|
224
227
|
declare function readSqliteCommitRequest(bc: bare.ByteCursor): SqliteCommitRequest;
|
|
225
228
|
declare function writeSqliteCommitRequest(bc: bare.ByteCursor, x: SqliteCommitRequest): void;
|
|
226
|
-
type SqliteCommitOk =
|
|
229
|
+
type SqliteCommitOk = {
|
|
230
|
+
readonly headTxid: u64 | null;
|
|
231
|
+
};
|
|
232
|
+
declare function readSqliteCommitOk(bc: bare.ByteCursor): SqliteCommitOk;
|
|
233
|
+
declare function writeSqliteCommitOk(bc: bare.ByteCursor, x: SqliteCommitOk): void;
|
|
227
234
|
type SqliteCommitResponse = {
|
|
228
235
|
readonly tag: "SqliteCommitOk";
|
|
229
236
|
readonly val: SqliteCommitOk;
|
|
@@ -321,6 +328,20 @@ type SqliteExecuteRequest = {
|
|
|
321
328
|
};
|
|
322
329
|
declare function readSqliteExecuteRequest(bc: bare.ByteCursor): SqliteExecuteRequest;
|
|
323
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;
|
|
324
345
|
type SqliteExecOk = {
|
|
325
346
|
readonly result: SqliteQueryResult;
|
|
326
347
|
};
|
|
@@ -331,6 +352,11 @@ type SqliteExecuteOk = {
|
|
|
331
352
|
};
|
|
332
353
|
declare function readSqliteExecuteOk(bc: bare.ByteCursor): SqliteExecuteOk;
|
|
333
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;
|
|
334
360
|
type SqliteExecResponse = {
|
|
335
361
|
readonly tag: "SqliteExecOk";
|
|
336
362
|
readonly val: SqliteExecOk;
|
|
@@ -349,6 +375,15 @@ type SqliteExecuteResponse = {
|
|
|
349
375
|
};
|
|
350
376
|
declare function readSqliteExecuteResponse(bc: bare.ByteCursor): SqliteExecuteResponse;
|
|
351
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;
|
|
352
387
|
/**
|
|
353
388
|
* Core
|
|
354
389
|
*/
|
|
@@ -751,6 +786,12 @@ type ToRivetSqliteExecuteRequest = {
|
|
|
751
786
|
};
|
|
752
787
|
declare function readToRivetSqliteExecuteRequest(bc: bare.ByteCursor): ToRivetSqliteExecuteRequest;
|
|
753
788
|
declare function writeToRivetSqliteExecuteRequest(bc: bare.ByteCursor, x: ToRivetSqliteExecuteRequest): void;
|
|
789
|
+
type ToRivetSqliteExecuteBatchRequest = {
|
|
790
|
+
readonly requestId: u32;
|
|
791
|
+
readonly data: SqliteExecuteBatchRequest;
|
|
792
|
+
};
|
|
793
|
+
declare function readToRivetSqliteExecuteBatchRequest(bc: bare.ByteCursor): ToRivetSqliteExecuteBatchRequest;
|
|
794
|
+
declare function writeToRivetSqliteExecuteBatchRequest(bc: bare.ByteCursor, x: ToRivetSqliteExecuteBatchRequest): void;
|
|
754
795
|
type ToRivet = {
|
|
755
796
|
readonly tag: "ToRivetMetadata";
|
|
756
797
|
readonly val: ToRivetMetadata;
|
|
@@ -784,6 +825,9 @@ type ToRivet = {
|
|
|
784
825
|
} | {
|
|
785
826
|
readonly tag: "ToRivetSqliteExecuteRequest";
|
|
786
827
|
readonly val: ToRivetSqliteExecuteRequest;
|
|
828
|
+
} | {
|
|
829
|
+
readonly tag: "ToRivetSqliteExecuteBatchRequest";
|
|
830
|
+
readonly val: ToRivetSqliteExecuteBatchRequest;
|
|
787
831
|
};
|
|
788
832
|
declare function readToRivet(bc: bare.ByteCursor): ToRivet;
|
|
789
833
|
declare function writeToRivet(bc: bare.ByteCursor, x: ToRivet): void;
|
|
@@ -842,6 +886,12 @@ type ToEnvoySqliteExecuteResponse = {
|
|
|
842
886
|
};
|
|
843
887
|
declare function readToEnvoySqliteExecuteResponse(bc: bare.ByteCursor): ToEnvoySqliteExecuteResponse;
|
|
844
888
|
declare function writeToEnvoySqliteExecuteResponse(bc: bare.ByteCursor, x: ToEnvoySqliteExecuteResponse): void;
|
|
889
|
+
type ToEnvoySqliteExecuteBatchResponse = {
|
|
890
|
+
readonly requestId: u32;
|
|
891
|
+
readonly data: SqliteExecuteBatchResponse;
|
|
892
|
+
};
|
|
893
|
+
declare function readToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor): ToEnvoySqliteExecuteBatchResponse;
|
|
894
|
+
declare function writeToEnvoySqliteExecuteBatchResponse(bc: bare.ByteCursor, x: ToEnvoySqliteExecuteBatchResponse): void;
|
|
845
895
|
type ToEnvoy = {
|
|
846
896
|
readonly tag: "ToEnvoyInit";
|
|
847
897
|
readonly val: ToEnvoyInit;
|
|
@@ -872,6 +922,9 @@ type ToEnvoy = {
|
|
|
872
922
|
} | {
|
|
873
923
|
readonly tag: "ToEnvoySqliteExecuteResponse";
|
|
874
924
|
readonly val: ToEnvoySqliteExecuteResponse;
|
|
925
|
+
} | {
|
|
926
|
+
readonly tag: "ToEnvoySqliteExecuteBatchResponse";
|
|
927
|
+
readonly val: ToEnvoySqliteExecuteBatchResponse;
|
|
875
928
|
};
|
|
876
929
|
declare function readToEnvoy(bc: bare.ByteCursor): ToEnvoy;
|
|
877
930
|
declare function writeToEnvoy(bc: bare.ByteCursor, x: ToEnvoy): void;
|
|
@@ -947,6 +1000,6 @@ declare function readToOutbound(bc: bare.ByteCursor): ToOutbound;
|
|
|
947
1000
|
declare function writeToOutbound(bc: bare.ByteCursor, x: ToOutbound): void;
|
|
948
1001
|
declare function encodeToOutbound(x: ToOutbound, config?: Partial<bare.Config>): Uint8Array;
|
|
949
1002
|
declare function decodeToOutbound(bytes: Uint8Array): ToOutbound;
|
|
950
|
-
declare const VERSION =
|
|
1003
|
+
declare const VERSION = 6;
|
|
951
1004
|
|
|
952
|
-
export { type ActorCheckpoint, type ActorCommandKeyData, type ActorConfig, type ActorIntent, type ActorIntentSleep, type ActorIntentStop, type ActorName, type ActorState, type ActorStateRunning, type ActorStateStopped, type Command, type CommandStartActor, type CommandStopActor, type CommandWrapper, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type GatewayId, type HibernatingRequest, type Id, type Json, type KvDeleteRangeRequest, type KvDeleteRequest, type KvDeleteResponse, type KvDropRequest, type KvDropResponse, type KvErrorResponse, type KvGetRequest, type KvGetResponse, type KvKey, type KvListAllQuery, type KvListPrefixQuery, type KvListQuery, type KvListRangeQuery, type KvListRequest, type KvListResponse, type KvMetadata, type KvPutRequest, type KvPutResponse, type KvRequestData, type KvResponseData, type KvValue, type MessageId, type MessageIndex, type PreloadedKv, type PreloadedKvEntry, type ProtocolMetadata, type RequestId, type 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, 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, 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, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, 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, 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, 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, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
|
|
1005
|
+
export { type ActorCheckpoint, type ActorCommandKeyData, type ActorConfig, type ActorIntent, type ActorIntentSleep, type ActorIntentStop, type ActorName, type ActorState, type ActorStateRunning, type ActorStateStopped, type Command, type CommandStartActor, type CommandStopActor, type CommandWrapper, type Event, type EventActorIntent, type EventActorSetAlarm, type EventActorStateUpdate, type EventWrapper, type GatewayId, type HibernatingRequest, type Id, type Json, type KvDeleteRangeRequest, type KvDeleteRequest, type KvDeleteResponse, type KvDropRequest, type KvDropResponse, type KvErrorResponse, type KvGetRequest, type KvGetResponse, type KvKey, type KvListAllQuery, type KvListPrefixQuery, type KvListQuery, type KvListRangeQuery, type KvListRequest, type KvListResponse, type KvMetadata, type KvPutRequest, type KvPutResponse, type KvRequestData, type KvResponseData, type KvValue, type MessageId, type MessageIndex, type PreloadedKv, type PreloadedKvEntry, type ProtocolMetadata, type RequestId, type 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, 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, readToEnvoyRequestChunk, readToEnvoyRequestStart, readToEnvoySqliteCommitResponse, readToEnvoySqliteExecResponse, readToEnvoySqliteExecuteBatchResponse, readToEnvoySqliteExecuteResponse, readToEnvoySqliteGetPagesResponse, readToEnvoyTunnelMessage, readToEnvoyTunnelMessageKind, readToEnvoyWebSocketClose, readToEnvoyWebSocketMessage, readToEnvoyWebSocketOpen, readToGateway, readToGatewayPong, readToOutbound, readToOutboundActorStart, readToRivet, readToRivetAckCommands, readToRivetEvents, readToRivetKvRequest, readToRivetMetadata, readToRivetPong, 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, 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, writeToEnvoyRequestChunk, writeToEnvoyRequestStart, writeToEnvoySqliteCommitResponse, writeToEnvoySqliteExecResponse, writeToEnvoySqliteExecuteBatchResponse, writeToEnvoySqliteExecuteResponse, writeToEnvoySqliteGetPagesResponse, writeToEnvoyTunnelMessage, writeToEnvoyTunnelMessageKind, writeToEnvoyWebSocketClose, writeToEnvoyWebSocketMessage, writeToEnvoyWebSocketOpen, writeToGateway, writeToGatewayPong, writeToOutbound, writeToOutboundActorStart, writeToRivet, writeToRivetAckCommands, writeToRivetEvents, writeToRivetKvRequest, writeToRivetMetadata, writeToRivetPong, writeToRivetResponseChunk, writeToRivetResponseStart, writeToRivetSqliteCommitRequest, writeToRivetSqliteExecRequest, writeToRivetSqliteExecuteBatchRequest, writeToRivetSqliteExecuteRequest, writeToRivetSqliteGetPagesRequest, writeToRivetTunnelMessage, writeToRivetTunnelMessageKind, writeToRivetWebSocketClose, writeToRivetWebSocketMessage, writeToRivetWebSocketMessageAck, writeToRivetWebSocketOpen };
|
package/dist/index.js
CHANGED
|
@@ -463,18 +463,24 @@ function write7(bc, x) {
|
|
|
463
463
|
}
|
|
464
464
|
function readSqliteGetPagesOk(bc) {
|
|
465
465
|
return {
|
|
466
|
-
pages: read7(bc)
|
|
466
|
+
pages: read7(bc),
|
|
467
|
+
headTxid: read2(bc)
|
|
467
468
|
};
|
|
468
469
|
}
|
|
469
470
|
function writeSqliteGetPagesOk(bc, x) {
|
|
470
471
|
write7(bc, x.pages);
|
|
472
|
+
write2(bc, x.headTxid);
|
|
471
473
|
}
|
|
472
474
|
function readSqliteErrorResponse(bc) {
|
|
473
475
|
return {
|
|
476
|
+
group: bare.readString(bc),
|
|
477
|
+
code: bare.readString(bc),
|
|
474
478
|
message: bare.readString(bc)
|
|
475
479
|
};
|
|
476
480
|
}
|
|
477
481
|
function writeSqliteErrorResponse(bc, x) {
|
|
482
|
+
bare.writeString(bc, x.group);
|
|
483
|
+
bare.writeString(bc, x.code);
|
|
478
484
|
bare.writeString(bc, x.message);
|
|
479
485
|
}
|
|
480
486
|
function readSqliteGetPagesResponse(bc) {
|
|
@@ -540,12 +546,20 @@ function writeSqliteCommitRequest(bc, x) {
|
|
|
540
546
|
write2(bc, x.expectedGeneration);
|
|
541
547
|
write2(bc, x.expectedHeadTxid);
|
|
542
548
|
}
|
|
549
|
+
function readSqliteCommitOk(bc) {
|
|
550
|
+
return {
|
|
551
|
+
headTxid: read2(bc)
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
function writeSqliteCommitOk(bc, x) {
|
|
555
|
+
write2(bc, x.headTxid);
|
|
556
|
+
}
|
|
543
557
|
function readSqliteCommitResponse(bc) {
|
|
544
558
|
const offset = bc.offset;
|
|
545
559
|
const tag = bare.readU8(bc);
|
|
546
560
|
switch (tag) {
|
|
547
561
|
case 0:
|
|
548
|
-
return { tag: "SqliteCommitOk", val:
|
|
562
|
+
return { tag: "SqliteCommitOk", val: readSqliteCommitOk(bc) };
|
|
549
563
|
case 1:
|
|
550
564
|
return { tag: "SqliteErrorResponse", val: readSqliteErrorResponse(bc) };
|
|
551
565
|
default: {
|
|
@@ -558,6 +572,7 @@ function writeSqliteCommitResponse(bc, x) {
|
|
|
558
572
|
switch (x.tag) {
|
|
559
573
|
case "SqliteCommitOk": {
|
|
560
574
|
bare.writeU8(bc, 0);
|
|
575
|
+
writeSqliteCommitOk(bc, x.val);
|
|
561
576
|
break;
|
|
562
577
|
}
|
|
563
578
|
case "SqliteErrorResponse": {
|
|
@@ -838,6 +853,47 @@ function writeSqliteExecuteRequest(bc, x) {
|
|
|
838
853
|
bare.writeString(bc, x.sql);
|
|
839
854
|
write14(bc, x.params);
|
|
840
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
|
+
}
|
|
841
897
|
function readSqliteExecOk(bc) {
|
|
842
898
|
return {
|
|
843
899
|
result: readSqliteQueryResult(bc)
|
|
@@ -854,6 +910,31 @@ function readSqliteExecuteOk(bc) {
|
|
|
854
910
|
function writeSqliteExecuteOk(bc, x) {
|
|
855
911
|
writeSqliteExecuteResult(bc, x.result);
|
|
856
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
|
+
}
|
|
857
938
|
function readSqliteExecResponse(bc) {
|
|
858
939
|
const offset = bc.offset;
|
|
859
940
|
const tag = bare.readU8(bc);
|
|
@@ -910,6 +991,34 @@ function writeSqliteExecuteResponse(bc, x) {
|
|
|
910
991
|
}
|
|
911
992
|
}
|
|
912
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
|
+
}
|
|
913
1022
|
var StopCode = /* @__PURE__ */ ((StopCode2) => {
|
|
914
1023
|
StopCode2["Ok"] = "Ok";
|
|
915
1024
|
StopCode2["Error"] = "Error";
|
|
@@ -949,19 +1058,19 @@ function readActorName(bc) {
|
|
|
949
1058
|
function writeActorName(bc, x) {
|
|
950
1059
|
writeJson(bc, x.metadata);
|
|
951
1060
|
}
|
|
952
|
-
function
|
|
1061
|
+
function read17(bc) {
|
|
953
1062
|
return bare.readBool(bc) ? bare.readString(bc) : null;
|
|
954
1063
|
}
|
|
955
|
-
function
|
|
1064
|
+
function write17(bc, x) {
|
|
956
1065
|
bare.writeBool(bc, x != null);
|
|
957
1066
|
if (x != null) {
|
|
958
1067
|
bare.writeString(bc, x);
|
|
959
1068
|
}
|
|
960
1069
|
}
|
|
961
|
-
function
|
|
1070
|
+
function read18(bc) {
|
|
962
1071
|
return bare.readBool(bc) ? bare.readData(bc) : null;
|
|
963
1072
|
}
|
|
964
|
-
function
|
|
1073
|
+
function write18(bc, x) {
|
|
965
1074
|
bare.writeBool(bc, x != null);
|
|
966
1075
|
if (x != null) {
|
|
967
1076
|
bare.writeData(bc, x);
|
|
@@ -970,16 +1079,16 @@ function write16(bc, x) {
|
|
|
970
1079
|
function readActorConfig(bc) {
|
|
971
1080
|
return {
|
|
972
1081
|
name: bare.readString(bc),
|
|
973
|
-
key:
|
|
1082
|
+
key: read17(bc),
|
|
974
1083
|
createTs: bare.readI64(bc),
|
|
975
|
-
input:
|
|
1084
|
+
input: read18(bc)
|
|
976
1085
|
};
|
|
977
1086
|
}
|
|
978
1087
|
function writeActorConfig(bc, x) {
|
|
979
1088
|
bare.writeString(bc, x.name);
|
|
980
|
-
|
|
1089
|
+
write17(bc, x.key);
|
|
981
1090
|
bare.writeI64(bc, x.createTs);
|
|
982
|
-
|
|
1091
|
+
write18(bc, x.input);
|
|
983
1092
|
}
|
|
984
1093
|
function readActorCheckpoint(bc) {
|
|
985
1094
|
return {
|
|
@@ -1022,12 +1131,12 @@ function writeActorIntent(bc, x) {
|
|
|
1022
1131
|
function readActorStateStopped(bc) {
|
|
1023
1132
|
return {
|
|
1024
1133
|
code: readStopCode(bc),
|
|
1025
|
-
message:
|
|
1134
|
+
message: read17(bc)
|
|
1026
1135
|
};
|
|
1027
1136
|
}
|
|
1028
1137
|
function writeActorStateStopped(bc, x) {
|
|
1029
1138
|
writeStopCode(bc, x.code);
|
|
1030
|
-
|
|
1139
|
+
write17(bc, x.message);
|
|
1031
1140
|
}
|
|
1032
1141
|
function readActorState(bc) {
|
|
1033
1142
|
const offset = bc.offset;
|
|
@@ -1137,7 +1246,7 @@ function writePreloadedKvEntry(bc, x) {
|
|
|
1137
1246
|
writeKvValue(bc, x.value);
|
|
1138
1247
|
writeKvMetadata(bc, x.metadata);
|
|
1139
1248
|
}
|
|
1140
|
-
function
|
|
1249
|
+
function read19(bc) {
|
|
1141
1250
|
const len = bare.readUintSafe(bc);
|
|
1142
1251
|
if (len === 0) {
|
|
1143
1252
|
return [];
|
|
@@ -1148,7 +1257,7 @@ function read17(bc) {
|
|
|
1148
1257
|
}
|
|
1149
1258
|
return result;
|
|
1150
1259
|
}
|
|
1151
|
-
function
|
|
1260
|
+
function write19(bc, x) {
|
|
1152
1261
|
bare.writeUintSafe(bc, x.length);
|
|
1153
1262
|
for (let i = 0; i < x.length; i++) {
|
|
1154
1263
|
writePreloadedKvEntry(bc, x[i]);
|
|
@@ -1156,13 +1265,13 @@ function write17(bc, x) {
|
|
|
1156
1265
|
}
|
|
1157
1266
|
function readPreloadedKv(bc) {
|
|
1158
1267
|
return {
|
|
1159
|
-
entries:
|
|
1268
|
+
entries: read19(bc),
|
|
1160
1269
|
requestedGetKeys: read0(bc),
|
|
1161
1270
|
requestedPrefixes: read0(bc)
|
|
1162
1271
|
};
|
|
1163
1272
|
}
|
|
1164
1273
|
function writePreloadedKv(bc, x) {
|
|
1165
|
-
|
|
1274
|
+
write19(bc, x.entries);
|
|
1166
1275
|
write0(bc, x.requestedGetKeys);
|
|
1167
1276
|
write0(bc, x.requestedPrefixes);
|
|
1168
1277
|
}
|
|
@@ -1176,7 +1285,7 @@ function writeHibernatingRequest(bc, x) {
|
|
|
1176
1285
|
writeGatewayId(bc, x.gatewayId);
|
|
1177
1286
|
writeRequestId(bc, x.requestId);
|
|
1178
1287
|
}
|
|
1179
|
-
function
|
|
1288
|
+
function read20(bc) {
|
|
1180
1289
|
const len = bare.readUintSafe(bc);
|
|
1181
1290
|
if (len === 0) {
|
|
1182
1291
|
return [];
|
|
@@ -1187,16 +1296,16 @@ function read18(bc) {
|
|
|
1187
1296
|
}
|
|
1188
1297
|
return result;
|
|
1189
1298
|
}
|
|
1190
|
-
function
|
|
1299
|
+
function write20(bc, x) {
|
|
1191
1300
|
bare.writeUintSafe(bc, x.length);
|
|
1192
1301
|
for (let i = 0; i < x.length; i++) {
|
|
1193
1302
|
writeHibernatingRequest(bc, x[i]);
|
|
1194
1303
|
}
|
|
1195
1304
|
}
|
|
1196
|
-
function
|
|
1305
|
+
function read21(bc) {
|
|
1197
1306
|
return bare.readBool(bc) ? readPreloadedKv(bc) : null;
|
|
1198
1307
|
}
|
|
1199
|
-
function
|
|
1308
|
+
function write21(bc, x) {
|
|
1200
1309
|
bare.writeBool(bc, x != null);
|
|
1201
1310
|
if (x != null) {
|
|
1202
1311
|
writePreloadedKv(bc, x);
|
|
@@ -1205,14 +1314,14 @@ function write19(bc, x) {
|
|
|
1205
1314
|
function readCommandStartActor(bc) {
|
|
1206
1315
|
return {
|
|
1207
1316
|
config: readActorConfig(bc),
|
|
1208
|
-
hibernatingRequests:
|
|
1209
|
-
preloadedKv:
|
|
1317
|
+
hibernatingRequests: read20(bc),
|
|
1318
|
+
preloadedKv: read21(bc)
|
|
1210
1319
|
};
|
|
1211
1320
|
}
|
|
1212
1321
|
function writeCommandStartActor(bc, x) {
|
|
1213
1322
|
writeActorConfig(bc, x.config);
|
|
1214
|
-
|
|
1215
|
-
|
|
1323
|
+
write20(bc, x.hibernatingRequests);
|
|
1324
|
+
write21(bc, x.preloadedKv);
|
|
1216
1325
|
}
|
|
1217
1326
|
var StopActorReason = /* @__PURE__ */ ((StopActorReason2) => {
|
|
1218
1327
|
StopActorReason2["SleepIntent"] = "SleepIntent";
|
|
@@ -1369,7 +1478,7 @@ function writeMessageId(bc, x) {
|
|
|
1369
1478
|
writeRequestId(bc, x.requestId);
|
|
1370
1479
|
writeMessageIndex(bc, x.messageIndex);
|
|
1371
1480
|
}
|
|
1372
|
-
function
|
|
1481
|
+
function read22(bc) {
|
|
1373
1482
|
const len = bare.readUintSafe(bc);
|
|
1374
1483
|
const result = /* @__PURE__ */ new Map();
|
|
1375
1484
|
for (let i = 0; i < len; i++) {
|
|
@@ -1383,7 +1492,7 @@ function read20(bc) {
|
|
|
1383
1492
|
}
|
|
1384
1493
|
return result;
|
|
1385
1494
|
}
|
|
1386
|
-
function
|
|
1495
|
+
function write22(bc, x) {
|
|
1387
1496
|
bare.writeUintSafe(bc, x.size);
|
|
1388
1497
|
for (const kv of x) {
|
|
1389
1498
|
bare.writeString(bc, kv[0]);
|
|
@@ -1395,8 +1504,8 @@ function readToEnvoyRequestStart(bc) {
|
|
|
1395
1504
|
actorId: readId(bc),
|
|
1396
1505
|
method: bare.readString(bc),
|
|
1397
1506
|
path: bare.readString(bc),
|
|
1398
|
-
headers:
|
|
1399
|
-
body:
|
|
1507
|
+
headers: read22(bc),
|
|
1508
|
+
body: read18(bc),
|
|
1400
1509
|
stream: bare.readBool(bc)
|
|
1401
1510
|
};
|
|
1402
1511
|
}
|
|
@@ -1404,8 +1513,8 @@ function writeToEnvoyRequestStart(bc, x) {
|
|
|
1404
1513
|
writeId(bc, x.actorId);
|
|
1405
1514
|
bare.writeString(bc, x.method);
|
|
1406
1515
|
bare.writeString(bc, x.path);
|
|
1407
|
-
|
|
1408
|
-
|
|
1516
|
+
write22(bc, x.headers);
|
|
1517
|
+
write18(bc, x.body);
|
|
1409
1518
|
bare.writeBool(bc, x.stream);
|
|
1410
1519
|
}
|
|
1411
1520
|
function readToEnvoyRequestChunk(bc) {
|
|
@@ -1421,15 +1530,15 @@ function writeToEnvoyRequestChunk(bc, x) {
|
|
|
1421
1530
|
function readToRivetResponseStart(bc) {
|
|
1422
1531
|
return {
|
|
1423
1532
|
status: bare.readU16(bc),
|
|
1424
|
-
headers:
|
|
1425
|
-
body:
|
|
1533
|
+
headers: read22(bc),
|
|
1534
|
+
body: read18(bc),
|
|
1426
1535
|
stream: bare.readBool(bc)
|
|
1427
1536
|
};
|
|
1428
1537
|
}
|
|
1429
1538
|
function writeToRivetResponseStart(bc, x) {
|
|
1430
1539
|
bare.writeU16(bc, x.status);
|
|
1431
|
-
|
|
1432
|
-
|
|
1540
|
+
write22(bc, x.headers);
|
|
1541
|
+
write18(bc, x.body);
|
|
1433
1542
|
bare.writeBool(bc, x.stream);
|
|
1434
1543
|
}
|
|
1435
1544
|
function readToRivetResponseChunk(bc) {
|
|
@@ -1446,13 +1555,13 @@ function readToEnvoyWebSocketOpen(bc) {
|
|
|
1446
1555
|
return {
|
|
1447
1556
|
actorId: readId(bc),
|
|
1448
1557
|
path: bare.readString(bc),
|
|
1449
|
-
headers:
|
|
1558
|
+
headers: read22(bc)
|
|
1450
1559
|
};
|
|
1451
1560
|
}
|
|
1452
1561
|
function writeToEnvoyWebSocketOpen(bc, x) {
|
|
1453
1562
|
writeId(bc, x.actorId);
|
|
1454
1563
|
bare.writeString(bc, x.path);
|
|
1455
|
-
|
|
1564
|
+
write22(bc, x.headers);
|
|
1456
1565
|
}
|
|
1457
1566
|
function readToEnvoyWebSocketMessage(bc) {
|
|
1458
1567
|
return {
|
|
@@ -1464,10 +1573,10 @@ function writeToEnvoyWebSocketMessage(bc, x) {
|
|
|
1464
1573
|
bare.writeData(bc, x.data);
|
|
1465
1574
|
bare.writeBool(bc, x.binary);
|
|
1466
1575
|
}
|
|
1467
|
-
function
|
|
1576
|
+
function read23(bc) {
|
|
1468
1577
|
return bare.readBool(bc) ? bare.readU16(bc) : null;
|
|
1469
1578
|
}
|
|
1470
|
-
function
|
|
1579
|
+
function write23(bc, x) {
|
|
1471
1580
|
bare.writeBool(bc, x != null);
|
|
1472
1581
|
if (x != null) {
|
|
1473
1582
|
bare.writeU16(bc, x);
|
|
@@ -1475,13 +1584,13 @@ function write21(bc, x) {
|
|
|
1475
1584
|
}
|
|
1476
1585
|
function readToEnvoyWebSocketClose(bc) {
|
|
1477
1586
|
return {
|
|
1478
|
-
code:
|
|
1479
|
-
reason:
|
|
1587
|
+
code: read23(bc),
|
|
1588
|
+
reason: read17(bc)
|
|
1480
1589
|
};
|
|
1481
1590
|
}
|
|
1482
1591
|
function writeToEnvoyWebSocketClose(bc, x) {
|
|
1483
|
-
|
|
1484
|
-
|
|
1592
|
+
write23(bc, x.code);
|
|
1593
|
+
write17(bc, x.reason);
|
|
1485
1594
|
}
|
|
1486
1595
|
function readToRivetWebSocketOpen(bc) {
|
|
1487
1596
|
return {
|
|
@@ -1511,14 +1620,14 @@ function writeToRivetWebSocketMessageAck(bc, x) {
|
|
|
1511
1620
|
}
|
|
1512
1621
|
function readToRivetWebSocketClose(bc) {
|
|
1513
1622
|
return {
|
|
1514
|
-
code:
|
|
1515
|
-
reason:
|
|
1623
|
+
code: read23(bc),
|
|
1624
|
+
reason: read17(bc),
|
|
1516
1625
|
hibernate: bare.readBool(bc)
|
|
1517
1626
|
};
|
|
1518
1627
|
}
|
|
1519
1628
|
function writeToRivetWebSocketClose(bc, x) {
|
|
1520
|
-
|
|
1521
|
-
|
|
1629
|
+
write23(bc, x.code);
|
|
1630
|
+
write17(bc, x.reason);
|
|
1522
1631
|
bare.writeBool(bc, x.hibernate);
|
|
1523
1632
|
}
|
|
1524
1633
|
function readToRivetTunnelMessageKind(bc) {
|
|
@@ -1666,7 +1775,7 @@ function readToEnvoyPing(bc) {
|
|
|
1666
1775
|
function writeToEnvoyPing(bc, x) {
|
|
1667
1776
|
bare.writeI64(bc, x.ts);
|
|
1668
1777
|
}
|
|
1669
|
-
function
|
|
1778
|
+
function read24(bc) {
|
|
1670
1779
|
const len = bare.readUintSafe(bc);
|
|
1671
1780
|
const result = /* @__PURE__ */ new Map();
|
|
1672
1781
|
for (let i = 0; i < len; i++) {
|
|
@@ -1680,26 +1789,26 @@ function read22(bc) {
|
|
|
1680
1789
|
}
|
|
1681
1790
|
return result;
|
|
1682
1791
|
}
|
|
1683
|
-
function
|
|
1792
|
+
function write24(bc, x) {
|
|
1684
1793
|
bare.writeUintSafe(bc, x.size);
|
|
1685
1794
|
for (const kv of x) {
|
|
1686
1795
|
bare.writeString(bc, kv[0]);
|
|
1687
1796
|
writeActorName(bc, kv[1]);
|
|
1688
1797
|
}
|
|
1689
1798
|
}
|
|
1690
|
-
function
|
|
1691
|
-
return bare.readBool(bc) ?
|
|
1799
|
+
function read25(bc) {
|
|
1800
|
+
return bare.readBool(bc) ? read24(bc) : null;
|
|
1692
1801
|
}
|
|
1693
|
-
function
|
|
1802
|
+
function write25(bc, x) {
|
|
1694
1803
|
bare.writeBool(bc, x != null);
|
|
1695
1804
|
if (x != null) {
|
|
1696
|
-
|
|
1805
|
+
write24(bc, x);
|
|
1697
1806
|
}
|
|
1698
1807
|
}
|
|
1699
|
-
function
|
|
1808
|
+
function read26(bc) {
|
|
1700
1809
|
return bare.readBool(bc) ? readJson(bc) : null;
|
|
1701
1810
|
}
|
|
1702
|
-
function
|
|
1811
|
+
function write26(bc, x) {
|
|
1703
1812
|
bare.writeBool(bc, x != null);
|
|
1704
1813
|
if (x != null) {
|
|
1705
1814
|
writeJson(bc, x);
|
|
@@ -1707,13 +1816,13 @@ function write24(bc, x) {
|
|
|
1707
1816
|
}
|
|
1708
1817
|
function readToRivetMetadata(bc) {
|
|
1709
1818
|
return {
|
|
1710
|
-
prepopulateActorNames:
|
|
1711
|
-
metadata:
|
|
1819
|
+
prepopulateActorNames: read25(bc),
|
|
1820
|
+
metadata: read26(bc)
|
|
1712
1821
|
};
|
|
1713
1822
|
}
|
|
1714
1823
|
function writeToRivetMetadata(bc, x) {
|
|
1715
|
-
|
|
1716
|
-
|
|
1824
|
+
write25(bc, x.prepopulateActorNames);
|
|
1825
|
+
write26(bc, x.metadata);
|
|
1717
1826
|
}
|
|
1718
1827
|
function readToRivetEvents(bc) {
|
|
1719
1828
|
const len = bare.readUintSafe(bc);
|
|
@@ -1732,7 +1841,7 @@ function writeToRivetEvents(bc, x) {
|
|
|
1732
1841
|
writeEventWrapper(bc, x[i]);
|
|
1733
1842
|
}
|
|
1734
1843
|
}
|
|
1735
|
-
function
|
|
1844
|
+
function read27(bc) {
|
|
1736
1845
|
const len = bare.readUintSafe(bc);
|
|
1737
1846
|
if (len === 0) {
|
|
1738
1847
|
return [];
|
|
@@ -1743,7 +1852,7 @@ function read25(bc) {
|
|
|
1743
1852
|
}
|
|
1744
1853
|
return result;
|
|
1745
1854
|
}
|
|
1746
|
-
function
|
|
1855
|
+
function write27(bc, x) {
|
|
1747
1856
|
bare.writeUintSafe(bc, x.length);
|
|
1748
1857
|
for (let i = 0; i < x.length; i++) {
|
|
1749
1858
|
writeActorCheckpoint(bc, x[i]);
|
|
@@ -1751,11 +1860,11 @@ function write25(bc, x) {
|
|
|
1751
1860
|
}
|
|
1752
1861
|
function readToRivetAckCommands(bc) {
|
|
1753
1862
|
return {
|
|
1754
|
-
lastCommandCheckpoints:
|
|
1863
|
+
lastCommandCheckpoints: read27(bc)
|
|
1755
1864
|
};
|
|
1756
1865
|
}
|
|
1757
1866
|
function writeToRivetAckCommands(bc, x) {
|
|
1758
|
-
|
|
1867
|
+
write27(bc, x.lastCommandCheckpoints);
|
|
1759
1868
|
}
|
|
1760
1869
|
function readToRivetPong(bc) {
|
|
1761
1870
|
return {
|
|
@@ -1817,6 +1926,16 @@ function writeToRivetSqliteExecuteRequest(bc, x) {
|
|
|
1817
1926
|
bare.writeU32(bc, x.requestId);
|
|
1818
1927
|
writeSqliteExecuteRequest(bc, x.data);
|
|
1819
1928
|
}
|
|
1929
|
+
function readToRivetSqliteExecuteBatchRequest(bc) {
|
|
1930
|
+
return {
|
|
1931
|
+
requestId: bare.readU32(bc),
|
|
1932
|
+
data: readSqliteExecuteBatchRequest(bc)
|
|
1933
|
+
};
|
|
1934
|
+
}
|
|
1935
|
+
function writeToRivetSqliteExecuteBatchRequest(bc, x) {
|
|
1936
|
+
bare.writeU32(bc, x.requestId);
|
|
1937
|
+
writeSqliteExecuteBatchRequest(bc, x.data);
|
|
1938
|
+
}
|
|
1820
1939
|
function readToRivet(bc) {
|
|
1821
1940
|
const offset = bc.offset;
|
|
1822
1941
|
const tag = bare.readU8(bc);
|
|
@@ -1843,6 +1962,8 @@ function readToRivet(bc) {
|
|
|
1843
1962
|
return { tag: "ToRivetSqliteExecRequest", val: readToRivetSqliteExecRequest(bc) };
|
|
1844
1963
|
case 10:
|
|
1845
1964
|
return { tag: "ToRivetSqliteExecuteRequest", val: readToRivetSqliteExecuteRequest(bc) };
|
|
1965
|
+
case 11:
|
|
1966
|
+
return { tag: "ToRivetSqliteExecuteBatchRequest", val: readToRivetSqliteExecuteBatchRequest(bc) };
|
|
1846
1967
|
default: {
|
|
1847
1968
|
bc.offset = offset;
|
|
1848
1969
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -1905,6 +2026,11 @@ function writeToRivet(bc, x) {
|
|
|
1905
2026
|
writeToRivetSqliteExecuteRequest(bc, x.val);
|
|
1906
2027
|
break;
|
|
1907
2028
|
}
|
|
2029
|
+
case "ToRivetSqliteExecuteBatchRequest": {
|
|
2030
|
+
bare.writeU8(bc, 11);
|
|
2031
|
+
writeToRivetSqliteExecuteBatchRequest(bc, x.val);
|
|
2032
|
+
break;
|
|
2033
|
+
}
|
|
1908
2034
|
}
|
|
1909
2035
|
}
|
|
1910
2036
|
function encodeToRivet(x, config) {
|
|
@@ -1963,11 +2089,11 @@ function writeToEnvoyCommands(bc, x) {
|
|
|
1963
2089
|
}
|
|
1964
2090
|
function readToEnvoyAckEvents(bc) {
|
|
1965
2091
|
return {
|
|
1966
|
-
lastEventCheckpoints:
|
|
2092
|
+
lastEventCheckpoints: read27(bc)
|
|
1967
2093
|
};
|
|
1968
2094
|
}
|
|
1969
2095
|
function writeToEnvoyAckEvents(bc, x) {
|
|
1970
|
-
|
|
2096
|
+
write27(bc, x.lastEventCheckpoints);
|
|
1971
2097
|
}
|
|
1972
2098
|
function readToEnvoyKvResponse(bc) {
|
|
1973
2099
|
return {
|
|
@@ -2019,6 +2145,16 @@ function writeToEnvoySqliteExecuteResponse(bc, x) {
|
|
|
2019
2145
|
bare.writeU32(bc, x.requestId);
|
|
2020
2146
|
writeSqliteExecuteResponse(bc, x.data);
|
|
2021
2147
|
}
|
|
2148
|
+
function readToEnvoySqliteExecuteBatchResponse(bc) {
|
|
2149
|
+
return {
|
|
2150
|
+
requestId: bare.readU32(bc),
|
|
2151
|
+
data: readSqliteExecuteBatchResponse(bc)
|
|
2152
|
+
};
|
|
2153
|
+
}
|
|
2154
|
+
function writeToEnvoySqliteExecuteBatchResponse(bc, x) {
|
|
2155
|
+
bare.writeU32(bc, x.requestId);
|
|
2156
|
+
writeSqliteExecuteBatchResponse(bc, x.data);
|
|
2157
|
+
}
|
|
2022
2158
|
function readToEnvoy(bc) {
|
|
2023
2159
|
const offset = bc.offset;
|
|
2024
2160
|
const tag = bare.readU8(bc);
|
|
@@ -2043,6 +2179,8 @@ function readToEnvoy(bc) {
|
|
|
2043
2179
|
return { tag: "ToEnvoySqliteExecResponse", val: readToEnvoySqliteExecResponse(bc) };
|
|
2044
2180
|
case 9:
|
|
2045
2181
|
return { tag: "ToEnvoySqliteExecuteResponse", val: readToEnvoySqliteExecuteResponse(bc) };
|
|
2182
|
+
case 10:
|
|
2183
|
+
return { tag: "ToEnvoySqliteExecuteBatchResponse", val: readToEnvoySqliteExecuteBatchResponse(bc) };
|
|
2046
2184
|
default: {
|
|
2047
2185
|
bc.offset = offset;
|
|
2048
2186
|
throw new bare.BareError(offset, "invalid tag");
|
|
@@ -2101,6 +2239,11 @@ function writeToEnvoy(bc, x) {
|
|
|
2101
2239
|
writeToEnvoySqliteExecuteResponse(bc, x.val);
|
|
2102
2240
|
break;
|
|
2103
2241
|
}
|
|
2242
|
+
case "ToEnvoySqliteExecuteBatchResponse": {
|
|
2243
|
+
bare.writeU8(bc, 10);
|
|
2244
|
+
writeToEnvoySqliteExecuteBatchResponse(bc, x.val);
|
|
2245
|
+
break;
|
|
2246
|
+
}
|
|
2104
2247
|
}
|
|
2105
2248
|
}
|
|
2106
2249
|
function encodeToEnvoy(x, config) {
|
|
@@ -2307,7 +2450,7 @@ function decodeToOutbound(bytes) {
|
|
|
2307
2450
|
function assert(condition, message) {
|
|
2308
2451
|
if (!condition) throw new Error(message ?? "Assertion failed");
|
|
2309
2452
|
}
|
|
2310
|
-
var VERSION =
|
|
2453
|
+
var VERSION = 6;
|
|
2311
2454
|
export {
|
|
2312
2455
|
StopActorReason,
|
|
2313
2456
|
StopCode,
|
|
@@ -2366,8 +2509,10 @@ export {
|
|
|
2366
2509
|
readPreloadedKvEntry,
|
|
2367
2510
|
readProtocolMetadata,
|
|
2368
2511
|
readRequestId,
|
|
2512
|
+
readSqliteBatchStatement,
|
|
2369
2513
|
readSqliteBindParam,
|
|
2370
2514
|
readSqliteColumnValue,
|
|
2515
|
+
readSqliteCommitOk,
|
|
2371
2516
|
readSqliteCommitRequest,
|
|
2372
2517
|
readSqliteCommitResponse,
|
|
2373
2518
|
readSqliteDirtyPage,
|
|
@@ -2375,6 +2520,9 @@ export {
|
|
|
2375
2520
|
readSqliteExecOk,
|
|
2376
2521
|
readSqliteExecRequest,
|
|
2377
2522
|
readSqliteExecResponse,
|
|
2523
|
+
readSqliteExecuteBatchOk,
|
|
2524
|
+
readSqliteExecuteBatchRequest,
|
|
2525
|
+
readSqliteExecuteBatchResponse,
|
|
2378
2526
|
readSqliteExecuteOk,
|
|
2379
2527
|
readSqliteExecuteRequest,
|
|
2380
2528
|
readSqliteExecuteResponse,
|
|
@@ -2405,6 +2553,7 @@ export {
|
|
|
2405
2553
|
readToEnvoyRequestStart,
|
|
2406
2554
|
readToEnvoySqliteCommitResponse,
|
|
2407
2555
|
readToEnvoySqliteExecResponse,
|
|
2556
|
+
readToEnvoySqliteExecuteBatchResponse,
|
|
2408
2557
|
readToEnvoySqliteExecuteResponse,
|
|
2409
2558
|
readToEnvoySqliteGetPagesResponse,
|
|
2410
2559
|
readToEnvoyTunnelMessage,
|
|
@@ -2426,6 +2575,7 @@ export {
|
|
|
2426
2575
|
readToRivetResponseStart,
|
|
2427
2576
|
readToRivetSqliteCommitRequest,
|
|
2428
2577
|
readToRivetSqliteExecRequest,
|
|
2578
|
+
readToRivetSqliteExecuteBatchRequest,
|
|
2429
2579
|
readToRivetSqliteExecuteRequest,
|
|
2430
2580
|
readToRivetSqliteGetPagesRequest,
|
|
2431
2581
|
readToRivetTunnelMessage,
|
|
@@ -2476,8 +2626,10 @@ export {
|
|
|
2476
2626
|
writePreloadedKvEntry,
|
|
2477
2627
|
writeProtocolMetadata,
|
|
2478
2628
|
writeRequestId,
|
|
2629
|
+
writeSqliteBatchStatement,
|
|
2479
2630
|
writeSqliteBindParam,
|
|
2480
2631
|
writeSqliteColumnValue,
|
|
2632
|
+
writeSqliteCommitOk,
|
|
2481
2633
|
writeSqliteCommitRequest,
|
|
2482
2634
|
writeSqliteCommitResponse,
|
|
2483
2635
|
writeSqliteDirtyPage,
|
|
@@ -2485,6 +2637,9 @@ export {
|
|
|
2485
2637
|
writeSqliteExecOk,
|
|
2486
2638
|
writeSqliteExecRequest,
|
|
2487
2639
|
writeSqliteExecResponse,
|
|
2640
|
+
writeSqliteExecuteBatchOk,
|
|
2641
|
+
writeSqliteExecuteBatchRequest,
|
|
2642
|
+
writeSqliteExecuteBatchResponse,
|
|
2488
2643
|
writeSqliteExecuteOk,
|
|
2489
2644
|
writeSqliteExecuteRequest,
|
|
2490
2645
|
writeSqliteExecuteResponse,
|
|
@@ -2515,6 +2670,7 @@ export {
|
|
|
2515
2670
|
writeToEnvoyRequestStart,
|
|
2516
2671
|
writeToEnvoySqliteCommitResponse,
|
|
2517
2672
|
writeToEnvoySqliteExecResponse,
|
|
2673
|
+
writeToEnvoySqliteExecuteBatchResponse,
|
|
2518
2674
|
writeToEnvoySqliteExecuteResponse,
|
|
2519
2675
|
writeToEnvoySqliteGetPagesResponse,
|
|
2520
2676
|
writeToEnvoyTunnelMessage,
|
|
@@ -2536,6 +2692,7 @@ export {
|
|
|
2536
2692
|
writeToRivetResponseStart,
|
|
2537
2693
|
writeToRivetSqliteCommitRequest,
|
|
2538
2694
|
writeToRivetSqliteExecRequest,
|
|
2695
|
+
writeToRivetSqliteExecuteBatchRequest,
|
|
2539
2696
|
writeToRivetSqliteExecuteRequest,
|
|
2540
2697
|
writeToRivetSqliteGetPagesRequest,
|
|
2541
2698
|
writeToRivetTunnelMessage,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/engine-envoy-protocol",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-sql-metrics.eac581d",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -32,5 +32,10 @@
|
|
|
32
32
|
"@types/node": "^20.19.13",
|
|
33
33
|
"tsup": "^8.5.0",
|
|
34
34
|
"typescript": "^5.9.2"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "https://github.com/rivet-dev/actors.git",
|
|
39
|
+
"directory": "engine/sdks/typescript/envoy-protocol"
|
|
35
40
|
}
|
|
36
41
|
}
|