@rivetkit/engine-runner 2.3.0-rc.10 → 2.3.0-rc.11
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 +6 -6
- package/dist/mod.cjs.map +1 -1
- package/dist/mod.js +6 -6
- package/dist/mod.js.map +1 -1
- package/package.json +3 -3
- package/src/mod.ts +6 -6
- package/src/tunnel.ts +1 -5
- package/src/websocket-tunnel-adapter.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/engine-runner",
|
|
3
|
-
"version": "2.3.0-rc.
|
|
3
|
+
"version": "2.3.0-rc.11",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"bench": "tsx benches/actor-lifecycle.bench.ts"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@rivetkit/virtual-websocket": "2.3.0-rc.
|
|
29
|
-
"@rivetkit/engine-runner-protocol": "2.3.0-rc.
|
|
28
|
+
"@rivetkit/virtual-websocket": "2.3.0-rc.11",
|
|
29
|
+
"@rivetkit/engine-runner-protocol": "2.3.0-rc.11",
|
|
30
30
|
"uuid": "^12.0.0",
|
|
31
31
|
"pino": "^9.9.5",
|
|
32
32
|
"ws": "^8.18.3"
|
package/src/mod.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as protocol from "@rivetkit/engine-runner-protocol";
|
|
2
2
|
import type { Logger } from "pino";
|
|
3
|
+
import { v4 as uuidv4 } from "uuid";
|
|
3
4
|
import type WebSocket from "ws";
|
|
4
5
|
import { type ActorConfig, RunnerActor } from "./actor";
|
|
5
6
|
import { logger, setLogger } from "./log.js";
|
|
@@ -12,7 +13,6 @@ import {
|
|
|
12
13
|
unreachable,
|
|
13
14
|
} from "./utils";
|
|
14
15
|
import { importWebSocket } from "./websocket.js";
|
|
15
|
-
import { v4 as uuidv4 } from "uuid";
|
|
16
16
|
|
|
17
17
|
export type { HibernatingWebSocketMetadata };
|
|
18
18
|
export { RunnerActor, type ActorConfig };
|
|
@@ -1057,7 +1057,7 @@ export class Runner {
|
|
|
1057
1057
|
|
|
1058
1058
|
for (const [_, actor] of this.#actors) {
|
|
1059
1059
|
const checkpoint = ack.lastEventCheckpoints.find(
|
|
1060
|
-
(x) => x.actorId
|
|
1060
|
+
(x) => x.actorId === actor.actorId,
|
|
1061
1061
|
);
|
|
1062
1062
|
|
|
1063
1063
|
if (checkpoint) actor.handleAckEvents(checkpoint.index);
|
|
@@ -1178,14 +1178,14 @@ export class Runner {
|
|
|
1178
1178
|
await this.#config.onActorStart(actorId, generation, actorConfig);
|
|
1179
1179
|
|
|
1180
1180
|
instance.actorStartPromise.resolve();
|
|
1181
|
-
} catch (
|
|
1181
|
+
} catch (error) {
|
|
1182
1182
|
this.log?.error({
|
|
1183
1183
|
msg: "error starting runner actor",
|
|
1184
1184
|
actorId,
|
|
1185
|
-
|
|
1185
|
+
error,
|
|
1186
1186
|
});
|
|
1187
1187
|
|
|
1188
|
-
instance.actorStartPromise.reject(
|
|
1188
|
+
instance.actorStartPromise.reject(error);
|
|
1189
1189
|
|
|
1190
1190
|
// TODO: Mark as crashed
|
|
1191
1191
|
// Send stopped state update if start failed
|
|
@@ -1194,7 +1194,7 @@ export class Runner {
|
|
|
1194
1194
|
}
|
|
1195
1195
|
|
|
1196
1196
|
async #handleCommandStopActor(commandWrapper: protocol.CommandWrapper) {
|
|
1197
|
-
const
|
|
1197
|
+
const _stopCommand = commandWrapper.inner
|
|
1198
1198
|
.val as protocol.CommandStopActor;
|
|
1199
1199
|
|
|
1200
1200
|
const actorId = commandWrapper.checkpoint.actorId;
|
package/src/tunnel.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type * as protocol from "@rivetkit/engine-runner-protocol";
|
|
2
|
-
import type {
|
|
3
|
-
GatewayId,
|
|
4
|
-
MessageId,
|
|
5
|
-
RequestId,
|
|
6
|
-
} from "@rivetkit/engine-runner-protocol";
|
|
2
|
+
import type { GatewayId, RequestId } from "@rivetkit/engine-runner-protocol";
|
|
7
3
|
import type { Logger } from "pino";
|
|
8
4
|
import { type Runner, type RunnerActor, RunnerShutdownError } from "./mod";
|
|
9
5
|
import {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { Logger } from "pino";
|
|
2
1
|
import {
|
|
3
|
-
VirtualWebSocket,
|
|
4
|
-
type UniversalWebSocket,
|
|
5
2
|
type RivetMessageEvent,
|
|
3
|
+
type UniversalWebSocket,
|
|
4
|
+
VirtualWebSocket,
|
|
6
5
|
} from "@rivetkit/virtual-websocket";
|
|
6
|
+
import type { Logger } from "pino";
|
|
7
7
|
import type { Tunnel } from "./tunnel";
|
|
8
8
|
import {
|
|
9
9
|
MAX_PAYLOAD_SIZE,
|