@rivetkit/engine-runner 2.0.27 → 2.0.29-rc.1
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/mod.cjs +248 -143
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.d.cts +9 -1
- package/dist/mod.d.ts +9 -1
- package/dist/mod.js +239 -134
- package/dist/mod.js.map +1 -1
- package/package.json +7 -2
- package/src/actor.ts +18 -4
- package/src/mod.ts +193 -105
- package/src/stringify.ts +31 -32
- package/src/tunnel.ts +4 -13
- package/src/utils.ts +16 -0
- package/.turbo/turbo-build.log +0 -22
- package/benches/actor-lifecycle.bench.ts +0 -190
- package/benches/utils.ts +0 -143
- package/tests/lifecycle.test.ts +0 -596
- package/tests/utils.test.ts +0 -194
- package/tsconfig.json +0 -11
- package/tsup.config.ts +0 -4
- package/turbo.json +0 -4
- package/vitest.config.ts +0 -16
package/dist/mod.d.cts
CHANGED
|
@@ -122,6 +122,9 @@ declare class RunnerActor {
|
|
|
122
122
|
ws: WebSocketTunnelAdapter;
|
|
123
123
|
}>;
|
|
124
124
|
actorStartPromise: ReturnType<typeof promiseWithResolvers<void>>;
|
|
125
|
+
lastCommandIdx: bigint;
|
|
126
|
+
nextEventIdx: bigint;
|
|
127
|
+
eventHistory: protocol.EventWrapper[];
|
|
125
128
|
/**
|
|
126
129
|
* If restoreHibernatingRequests has been called. This is used to assert
|
|
127
130
|
* that the caller is implemented correctly.
|
|
@@ -140,8 +143,13 @@ declare class RunnerActor {
|
|
|
140
143
|
getWebSocket(gatewayId: protocol.GatewayId, requestId: protocol.RequestId): WebSocketTunnelAdapter | undefined;
|
|
141
144
|
setWebSocket(gatewayId: protocol.GatewayId, requestId: protocol.RequestId, ws: WebSocketTunnelAdapter): void;
|
|
142
145
|
deleteWebSocket(gatewayId: protocol.GatewayId, requestId: protocol.RequestId): void;
|
|
146
|
+
handleAckEvents(lastEventIdx: bigint): void;
|
|
147
|
+
recordEvent(eventWrapper: protocol.EventWrapper): void;
|
|
143
148
|
}
|
|
144
149
|
|
|
150
|
+
declare class RunnerShutdownError extends Error {
|
|
151
|
+
constructor();
|
|
152
|
+
}
|
|
145
153
|
interface RunnerConfig {
|
|
146
154
|
logger?: Logger;
|
|
147
155
|
version: number;
|
|
@@ -323,4 +331,4 @@ declare class Runner {
|
|
|
323
331
|
getServerlessInitPacket(): string | undefined;
|
|
324
332
|
}
|
|
325
333
|
|
|
326
|
-
export { type ActorConfig, type HibernatingWebSocketMetadata, type KvListOptions, Runner, RunnerActor, type RunnerConfig, idToStr };
|
|
334
|
+
export { type ActorConfig, type HibernatingWebSocketMetadata, type KvListOptions, Runner, RunnerActor, type RunnerConfig, RunnerShutdownError, idToStr };
|
package/dist/mod.d.ts
CHANGED
|
@@ -122,6 +122,9 @@ declare class RunnerActor {
|
|
|
122
122
|
ws: WebSocketTunnelAdapter;
|
|
123
123
|
}>;
|
|
124
124
|
actorStartPromise: ReturnType<typeof promiseWithResolvers<void>>;
|
|
125
|
+
lastCommandIdx: bigint;
|
|
126
|
+
nextEventIdx: bigint;
|
|
127
|
+
eventHistory: protocol.EventWrapper[];
|
|
125
128
|
/**
|
|
126
129
|
* If restoreHibernatingRequests has been called. This is used to assert
|
|
127
130
|
* that the caller is implemented correctly.
|
|
@@ -140,8 +143,13 @@ declare class RunnerActor {
|
|
|
140
143
|
getWebSocket(gatewayId: protocol.GatewayId, requestId: protocol.RequestId): WebSocketTunnelAdapter | undefined;
|
|
141
144
|
setWebSocket(gatewayId: protocol.GatewayId, requestId: protocol.RequestId, ws: WebSocketTunnelAdapter): void;
|
|
142
145
|
deleteWebSocket(gatewayId: protocol.GatewayId, requestId: protocol.RequestId): void;
|
|
146
|
+
handleAckEvents(lastEventIdx: bigint): void;
|
|
147
|
+
recordEvent(eventWrapper: protocol.EventWrapper): void;
|
|
143
148
|
}
|
|
144
149
|
|
|
150
|
+
declare class RunnerShutdownError extends Error {
|
|
151
|
+
constructor();
|
|
152
|
+
}
|
|
145
153
|
interface RunnerConfig {
|
|
146
154
|
logger?: Logger;
|
|
147
155
|
version: number;
|
|
@@ -323,4 +331,4 @@ declare class Runner {
|
|
|
323
331
|
getServerlessInitPacket(): string | undefined;
|
|
324
332
|
}
|
|
325
333
|
|
|
326
|
-
export { type ActorConfig, type HibernatingWebSocketMetadata, type KvListOptions, Runner, RunnerActor, type RunnerConfig, idToStr };
|
|
334
|
+
export { type ActorConfig, type HibernatingWebSocketMetadata, type KvListOptions, Runner, RunnerActor, type RunnerConfig, RunnerShutdownError, idToStr };
|