rivetkit 2.0.9 → 2.0.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/tsup/{chunk-F2YZNUPU.js → chunk-3JUN3IEH.js} +3 -3
- package/dist/tsup/{chunk-DL7TPF63.cjs → chunk-5ABUOI3V.cjs} +7 -7
- package/dist/tsup/{chunk-DL7TPF63.cjs.map → chunk-5ABUOI3V.cjs.map} +1 -1
- package/dist/tsup/{chunk-SDXTJDDR.cjs → chunk-5JZPEJVJ.cjs} +58 -14
- package/dist/tsup/chunk-5JZPEJVJ.cjs.map +1 -0
- package/dist/tsup/{chunk-SOC4HWCG.cjs → chunk-6PORXHSQ.cjs} +92 -39
- package/dist/tsup/chunk-6PORXHSQ.cjs.map +1 -0
- package/dist/tsup/{chunk-QGRYH6TU.cjs → chunk-765F7ILI.cjs} +7 -6
- package/dist/tsup/chunk-765F7ILI.cjs.map +1 -0
- package/dist/tsup/{chunk-DLPIL3VC.js → chunk-7DCESQ4O.js} +2 -2
- package/dist/tsup/{chunk-R7OP5N25.js → chunk-AZI2T6UF.js} +53 -9
- package/dist/tsup/chunk-AZI2T6UF.js.map +1 -0
- package/dist/tsup/{chunk-A44TWAS5.cjs → chunk-GGIW54I2.cjs} +6 -6
- package/dist/tsup/{chunk-A44TWAS5.cjs.map → chunk-GGIW54I2.cjs.map} +1 -1
- package/dist/tsup/{chunk-7OMMIAWP.cjs → chunk-HDCLOVOE.cjs} +17 -12
- package/dist/tsup/chunk-HDCLOVOE.cjs.map +1 -0
- package/dist/tsup/{chunk-2MJYYF2Q.cjs → chunk-I6AVFIVY.cjs} +12 -12
- package/dist/tsup/{chunk-2MJYYF2Q.cjs.map → chunk-I6AVFIVY.cjs.map} +1 -1
- package/dist/tsup/{chunk-WBSPHV5V.js → chunk-JTWD6ZT2.js} +2 -2
- package/dist/tsup/{chunk-4YV6RDZL.cjs → chunk-LXFOO25H.cjs} +722 -359
- package/dist/tsup/chunk-LXFOO25H.cjs.map +1 -0
- package/dist/tsup/{chunk-YR2VY4XS.js → chunk-MIP4PYTD.js} +5 -4
- package/dist/tsup/chunk-MIP4PYTD.js.map +1 -0
- package/dist/tsup/{chunk-KHZ2QSQ4.js → chunk-MT5ES4XD.js} +32 -10
- package/dist/tsup/chunk-MT5ES4XD.js.map +1 -0
- package/dist/tsup/{chunk-U2IXX6DY.cjs → chunk-NLYAKGML.cjs} +5 -6
- package/dist/tsup/chunk-NLYAKGML.cjs.map +1 -0
- package/dist/tsup/{chunk-FZP2IBIX.js → chunk-NOXYAPM2.js} +603 -240
- package/dist/tsup/chunk-NOXYAPM2.js.map +1 -0
- package/dist/tsup/{chunk-E63WU5PL.js → chunk-NQFIZSTR.js} +5 -6
- package/dist/tsup/chunk-NQFIZSTR.js.map +1 -0
- package/dist/tsup/{chunk-4PSLOAXR.cjs → chunk-O7BIBANW.cjs} +226 -204
- package/dist/tsup/chunk-O7BIBANW.cjs.map +1 -0
- package/dist/tsup/{chunk-VVCL5DXN.js → chunk-OHSP4BUE.js} +97 -44
- package/dist/tsup/{chunk-VVCL5DXN.js.map → chunk-OHSP4BUE.js.map} +1 -1
- package/dist/tsup/{chunk-APHV6WXU.js → chunk-SBUJ3KIM.js} +2 -2
- package/dist/tsup/{chunk-DZZQG7VH.cjs → chunk-WYTLLIJM.cjs} +3 -3
- package/dist/tsup/{chunk-DZZQG7VH.cjs.map → chunk-WYTLLIJM.cjs.map} +1 -1
- package/dist/tsup/{chunk-WRSWUDFA.js → chunk-XO7VX4MN.js} +14 -9
- package/dist/tsup/chunk-XO7VX4MN.js.map +1 -0
- package/dist/tsup/client/mod.cjs +9 -9
- package/dist/tsup/client/mod.d.cts +2 -2
- package/dist/tsup/client/mod.d.ts +2 -2
- package/dist/tsup/client/mod.js +8 -8
- package/dist/tsup/common/log.cjs +3 -3
- package/dist/tsup/common/log.js +2 -2
- package/dist/tsup/common/websocket.cjs +4 -4
- package/dist/tsup/common/websocket.js +3 -3
- package/dist/tsup/{conn-CEh3WKbA.d.cts → conn-CT_8ZBT_.d.cts} +204 -199
- package/dist/tsup/{conn-Bt8rkUzm.d.ts → conn-d5F0M95s.d.ts} +204 -199
- package/dist/tsup/driver-helpers/mod.cjs +5 -5
- package/dist/tsup/driver-helpers/mod.cjs.map +1 -1
- package/dist/tsup/driver-helpers/mod.d.cts +1 -1
- package/dist/tsup/driver-helpers/mod.d.ts +1 -1
- package/dist/tsup/driver-helpers/mod.js +6 -6
- package/dist/tsup/driver-test-suite/mod.cjs +117 -103
- package/dist/tsup/driver-test-suite/mod.cjs.map +1 -1
- package/dist/tsup/driver-test-suite/mod.d.cts +3 -2
- package/dist/tsup/driver-test-suite/mod.d.ts +3 -2
- package/dist/tsup/driver-test-suite/mod.js +62 -48
- package/dist/tsup/driver-test-suite/mod.js.map +1 -1
- package/dist/tsup/inspector/mod.cjs +6 -6
- package/dist/tsup/inspector/mod.d.cts +6 -6
- package/dist/tsup/inspector/mod.d.ts +6 -6
- package/dist/tsup/inspector/mod.js +5 -5
- package/dist/tsup/mod.cjs +10 -10
- package/dist/tsup/mod.d.cts +8 -39
- package/dist/tsup/mod.d.ts +8 -39
- package/dist/tsup/mod.js +9 -9
- package/dist/tsup/test/mod.cjs +11 -11
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +10 -10
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.d.cts +2 -1
- package/dist/tsup/utils.d.ts +2 -1
- package/dist/tsup/utils.js +1 -1
- package/package.json +4 -5
- package/src/actor/driver.ts +2 -2
- package/src/actor/protocol/serde.ts +75 -3
- package/src/actor/router-endpoints.ts +6 -6
- package/src/actor/router.ts +2 -2
- package/src/client/actor-conn.ts +24 -3
- package/src/client/config.ts +19 -26
- package/src/driver-helpers/mod.ts +4 -1
- package/src/driver-test-suite/mod.ts +66 -44
- package/src/driver-test-suite/utils.ts +4 -1
- package/src/drivers/default.ts +11 -9
- package/src/drivers/engine/actor-driver.ts +42 -39
- package/src/drivers/engine/config.ts +9 -22
- package/src/drivers/engine/mod.ts +9 -8
- package/src/drivers/file-system/global-state.ts +4 -4
- package/src/engine-process/log.ts +5 -0
- package/src/engine-process/mod.ts +316 -0
- package/src/inspector/utils.ts +6 -4
- package/src/manager/driver.ts +2 -2
- package/src/manager/gateway.ts +29 -11
- package/src/manager/router-schema.ts +20 -0
- package/src/manager/router.ts +116 -29
- package/src/registry/mod.ts +168 -113
- package/src/registry/run-config.ts +116 -47
- package/src/registry/serve.ts +3 -1
- package/src/serde.ts +3 -3
- package/src/test/config.ts +2 -2
- package/src/test/mod.ts +6 -3
- package/src/utils.ts +2 -0
- package/dist/tsup/chunk-4PSLOAXR.cjs.map +0 -1
- package/dist/tsup/chunk-4YV6RDZL.cjs.map +0 -1
- package/dist/tsup/chunk-7OMMIAWP.cjs.map +0 -1
- package/dist/tsup/chunk-E63WU5PL.js.map +0 -1
- package/dist/tsup/chunk-FZP2IBIX.js.map +0 -1
- package/dist/tsup/chunk-KHZ2QSQ4.js.map +0 -1
- package/dist/tsup/chunk-QGRYH6TU.cjs.map +0 -1
- package/dist/tsup/chunk-R7OP5N25.js.map +0 -1
- package/dist/tsup/chunk-SDXTJDDR.cjs.map +0 -1
- package/dist/tsup/chunk-SOC4HWCG.cjs.map +0 -1
- package/dist/tsup/chunk-U2IXX6DY.cjs.map +0 -1
- package/dist/tsup/chunk-WRSWUDFA.js.map +0 -1
- package/dist/tsup/chunk-YR2VY4XS.js.map +0 -1
- /package/dist/tsup/{chunk-F2YZNUPU.js.map → chunk-3JUN3IEH.js.map} +0 -0
- /package/dist/tsup/{chunk-DLPIL3VC.js.map → chunk-7DCESQ4O.js.map} +0 -0
- /package/dist/tsup/{chunk-WBSPHV5V.js.map → chunk-JTWD6ZT2.js.map} +0 -0
- /package/dist/tsup/{chunk-APHV6WXU.js.map → chunk-SBUJ3KIM.js.map} +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk765F7ILIcjs = require('../chunk-765F7ILI.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -27,10 +27,10 @@ var _chunkQGRYH6TUcjs = require('../chunk-QGRYH6TU.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
31
|
-
require('../chunk-
|
|
32
|
-
require('../chunk-
|
|
33
|
-
require('../chunk-
|
|
30
|
+
var _chunkI6AVFIVYcjs = require('../chunk-I6AVFIVY.cjs');
|
|
31
|
+
require('../chunk-5JZPEJVJ.cjs');
|
|
32
|
+
require('../chunk-5ABUOI3V.cjs');
|
|
33
|
+
require('../chunk-NLYAKGML.cjs');
|
|
34
34
|
require('../chunk-5QGQK44L.cjs');
|
|
35
35
|
|
|
36
36
|
|
|
@@ -59,5 +59,5 @@ require('../chunk-5QGQK44L.cjs');
|
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
exports.ActorFeature =
|
|
62
|
+
exports.ActorFeature = _chunkI6AVFIVYcjs.ActorFeature; exports.ActorId = _chunkI6AVFIVYcjs.ActorId; exports.ActorLogEntry = _chunkI6AVFIVYcjs.ActorLogEntry; exports.ActorSchema = _chunkI6AVFIVYcjs.ActorSchema; exports.BuildSchema = _chunkI6AVFIVYcjs.BuildSchema; exports.BuildsSchema = _chunkI6AVFIVYcjs.BuildsSchema; exports.ColumnSchema = _chunkI6AVFIVYcjs.ColumnSchema; exports.ColumnsSchema = _chunkI6AVFIVYcjs.ColumnsSchema; exports.ConnectionSchema = _chunkI6AVFIVYcjs.ConnectionSchema; exports.CreateActorSchema = _chunkI6AVFIVYcjs.CreateActorSchema; exports.DatabaseQuerySchema = _chunkI6AVFIVYcjs.DatabaseQuerySchema; exports.ForeignKeySchema = _chunkI6AVFIVYcjs.ForeignKeySchema; exports.ForeignKeysSchema = _chunkI6AVFIVYcjs.ForeignKeysSchema; exports.OperationSchema = _chunkI6AVFIVYcjs.OperationSchema; exports.PatchSchema = _chunkI6AVFIVYcjs.PatchSchema; exports.RealtimeEventSchema = _chunkI6AVFIVYcjs.RealtimeEventSchema; exports.RecordedRealtimeEventSchema = _chunkI6AVFIVYcjs.RecordedRealtimeEventSchema; exports.TableSchema = _chunkI6AVFIVYcjs.TableSchema; exports.TablesSchema = _chunkI6AVFIVYcjs.TablesSchema; exports.compareSecrets = _chunk765F7ILIcjs.compareSecrets; exports.configureInspectorAccessToken = _chunk765F7ILIcjs.configureInspectorAccessToken; exports.createActorInspectorClient = _chunk765F7ILIcjs.createActorInspectorClient; exports.createManagerInspectorClient = _chunk765F7ILIcjs.createManagerInspectorClient; exports.getInspectorUrl = _chunk765F7ILIcjs.getInspectorUrl; exports.isInspectorEnabled = _chunk765F7ILIcjs.isInspectorEnabled; exports.secureInspector = _chunk765F7ILIcjs.secureInspector;
|
|
63
63
|
//# sourceMappingURL=mod.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { al as ActorFeature, c as RunnerConfig, H as RunnerConfigInput, ai as ManagerDriver } from '../conn-CT_8ZBT_.cjs';
|
|
2
|
+
export { ap as Actor, am as ActorId, an as ActorLogEntry, ao as ActorSchema, aP as Build, aO as BuildSchema, aR as Builds, aQ as BuildsSchema, aH as Column, aG as ColumnSchema, aJ as Columns, aI as ColumnsSchema, av as Connection, au as ConnectionSchema, aT as CreateActor, aS as CreateActorSchema, aB as DatabaseQuery, aA as DatabaseQuerySchema, aL as ForeignKey, aK as ForeignKeySchema, aN as ForeignKeys, aM as ForeignKeysSchema, ar as Operation, aq as OperationSchema, at as Patch, as as PatchSchema, ax as RealtimeEvent, aw as RealtimeEventSchema, az as RecordedRealtimeEvent, ay as RecordedRealtimeEventSchema, aD as Table, aC as TableSchema, aF as Tables, aE as TablesSchema } from '../conn-CT_8ZBT_.cjs';
|
|
3
3
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
4
4
|
import * as hono_utils_types from 'hono/utils/types';
|
|
5
5
|
import * as hono_client from 'hono/client';
|
|
@@ -427,9 +427,9 @@ type ManagerInspectorClient = typeof client;
|
|
|
427
427
|
declare const createManagerInspectorClient: (...args: Parameters<typeof hc>) => ManagerInspectorClient;
|
|
428
428
|
|
|
429
429
|
declare function compareSecrets(providedSecret: string, validSecret: string): boolean;
|
|
430
|
-
declare const secureInspector: (runConfig:
|
|
431
|
-
declare function getInspectorUrl(runConfig:
|
|
432
|
-
declare const isInspectorEnabled: (runConfig:
|
|
433
|
-
declare const configureInspectorAccessToken: (runConfig:
|
|
430
|
+
declare const secureInspector: (runConfig: RunnerConfig) => hono.MiddlewareHandler<any, string, {}>;
|
|
431
|
+
declare function getInspectorUrl(runConfig: RunnerConfigInput | undefined): string;
|
|
432
|
+
declare const isInspectorEnabled: (runConfig: RunnerConfig, context: "actor" | "manager") => boolean;
|
|
433
|
+
declare const configureInspectorAccessToken: (runConfig: RunnerConfig, managerDriver: ManagerDriver) => void;
|
|
434
434
|
|
|
435
435
|
export { ActorFeature, type ActorInspectorClient, type ManagerInspectorClient, compareSecrets, configureInspectorAccessToken, createActorInspectorClient, createManagerInspectorClient, getInspectorUrl, isInspectorEnabled, secureInspector };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { al as ActorFeature, c as RunnerConfig, H as RunnerConfigInput, ai as ManagerDriver } from '../conn-d5F0M95s.js';
|
|
2
|
+
export { ap as Actor, am as ActorId, an as ActorLogEntry, ao as ActorSchema, aP as Build, aO as BuildSchema, aR as Builds, aQ as BuildsSchema, aH as Column, aG as ColumnSchema, aJ as Columns, aI as ColumnsSchema, av as Connection, au as ConnectionSchema, aT as CreateActor, aS as CreateActorSchema, aB as DatabaseQuery, aA as DatabaseQuerySchema, aL as ForeignKey, aK as ForeignKeySchema, aN as ForeignKeys, aM as ForeignKeysSchema, ar as Operation, aq as OperationSchema, at as Patch, as as PatchSchema, ax as RealtimeEvent, aw as RealtimeEventSchema, az as RecordedRealtimeEvent, ay as RecordedRealtimeEventSchema, aD as Table, aC as TableSchema, aF as Tables, aE as TablesSchema } from '../conn-d5F0M95s.js';
|
|
3
3
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
|
4
4
|
import * as hono_utils_types from 'hono/utils/types';
|
|
5
5
|
import * as hono_client from 'hono/client';
|
|
@@ -427,9 +427,9 @@ type ManagerInspectorClient = typeof client;
|
|
|
427
427
|
declare const createManagerInspectorClient: (...args: Parameters<typeof hc>) => ManagerInspectorClient;
|
|
428
428
|
|
|
429
429
|
declare function compareSecrets(providedSecret: string, validSecret: string): boolean;
|
|
430
|
-
declare const secureInspector: (runConfig:
|
|
431
|
-
declare function getInspectorUrl(runConfig:
|
|
432
|
-
declare const isInspectorEnabled: (runConfig:
|
|
433
|
-
declare const configureInspectorAccessToken: (runConfig:
|
|
430
|
+
declare const secureInspector: (runConfig: RunnerConfig) => hono.MiddlewareHandler<any, string, {}>;
|
|
431
|
+
declare function getInspectorUrl(runConfig: RunnerConfigInput | undefined): string;
|
|
432
|
+
declare const isInspectorEnabled: (runConfig: RunnerConfig, context: "actor" | "manager") => boolean;
|
|
433
|
+
declare const configureInspectorAccessToken: (runConfig: RunnerConfig, managerDriver: ManagerDriver) => void;
|
|
434
434
|
|
|
435
435
|
export { ActorFeature, type ActorInspectorClient, type ManagerInspectorClient, compareSecrets, configureInspectorAccessToken, createActorInspectorClient, createManagerInspectorClient, getInspectorUrl, isInspectorEnabled, secureInspector };
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
getInspectorUrl,
|
|
7
7
|
isInspectorEnabled,
|
|
8
8
|
secureInspector
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-MIP4PYTD.js";
|
|
10
10
|
import {
|
|
11
11
|
ActorFeature,
|
|
12
12
|
ActorId,
|
|
@@ -27,10 +27,10 @@ import {
|
|
|
27
27
|
RecordedRealtimeEventSchema,
|
|
28
28
|
TableSchema,
|
|
29
29
|
TablesSchema
|
|
30
|
-
} from "../chunk-
|
|
31
|
-
import "../chunk-
|
|
32
|
-
import "../chunk-
|
|
33
|
-
import "../chunk-
|
|
30
|
+
} from "../chunk-JTWD6ZT2.js";
|
|
31
|
+
import "../chunk-AZI2T6UF.js";
|
|
32
|
+
import "../chunk-7DCESQ4O.js";
|
|
33
|
+
import "../chunk-NQFIZSTR.js";
|
|
34
34
|
import "../chunk-YPZFLUO6.js";
|
|
35
35
|
export {
|
|
36
36
|
ActorFeature,
|
package/dist/tsup/mod.cjs
CHANGED
|
@@ -10,27 +10,27 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
require('./chunk-
|
|
13
|
+
var _chunkLXFOO25Hcjs = require('./chunk-LXFOO25H.cjs');
|
|
14
|
+
require('./chunk-765F7ILI.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
21
|
-
require('./chunk-
|
|
22
|
-
require('./chunk-
|
|
23
|
-
require('./chunk-
|
|
20
|
+
var _chunkO7BIBANWcjs = require('./chunk-O7BIBANW.cjs');
|
|
21
|
+
require('./chunk-I6AVFIVY.cjs');
|
|
22
|
+
require('./chunk-WYTLLIJM.cjs');
|
|
23
|
+
require('./chunk-6PORXHSQ.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
29
|
-
require('./chunk-
|
|
28
|
+
var _chunk5JZPEJVJcjs = require('./chunk-5JZPEJVJ.cjs');
|
|
29
|
+
require('./chunk-5ABUOI3V.cjs');
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunkNLYAKGMLcjs = require('./chunk-NLYAKGML.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
var _chunk5QGQK44Lcjs = require('./chunk-5QGQK44L.cjs');
|
|
@@ -56,5 +56,5 @@ var _chunk5QGQK44Lcjs = require('./chunk-5QGQK44L.cjs');
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
exports.ALLOWED_PUBLIC_HEADERS =
|
|
59
|
+
exports.ALLOWED_PUBLIC_HEADERS = _chunk5JZPEJVJcjs.ALLOWED_PUBLIC_HEADERS; exports.InlineWebSocketAdapter2 = _chunkLXFOO25Hcjs.InlineWebSocketAdapter2; exports.PATH_CONNECT_WEBSOCKET = _chunk5JZPEJVJcjs.PATH_CONNECT_WEBSOCKET; exports.PATH_RAW_WEBSOCKET_PREFIX = _chunk5JZPEJVJcjs.PATH_RAW_WEBSOCKET_PREFIX; exports.Registry = _chunkLXFOO25Hcjs.Registry; exports.RegistryConfigSchema = _chunkLXFOO25Hcjs.RegistryConfigSchema; exports.UserError = _chunk5QGQK44Lcjs.UserError; exports.actor = _chunkLXFOO25Hcjs.actor; exports.createActorRouter = _chunkLXFOO25Hcjs.createActorRouter; exports.createClientWithDriver = _chunkO7BIBANWcjs.createClientWithDriver; exports.createEngineDriver = _chunkLXFOO25Hcjs.createEngineDriver; exports.createFileSystemDriver = _chunkLXFOO25Hcjs.createFileSystemDriver; exports.createMemoryDriver = _chunkLXFOO25Hcjs.createMemoryDriver; exports.generateConnId = _chunkO7BIBANWcjs.generateConnId; exports.generateConnToken = _chunkO7BIBANWcjs.generateConnToken; exports.handleRawWebSocketHandler = _chunkLXFOO25Hcjs.handleRawWebSocketHandler; exports.handleWebSocketConnect = _chunkLXFOO25Hcjs.handleWebSocketConnect; exports.lookupInRegistry = _chunkO7BIBANWcjs.lookupInRegistry; exports.noopNext = _chunkNLYAKGMLcjs.noopNext; exports.setup = _chunkLXFOO25Hcjs.setup; exports.toUint8Array = _chunkNLYAKGMLcjs.toUint8Array;
|
|
60
60
|
//# sourceMappingURL=mod.cjs.map
|
package/dist/tsup/mod.d.cts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { U as UniversalWebSocket, R as RivetEvent, a as RivetCloseEvent, b as RivetMessageEvent, A as ActorDriver, c as
|
|
2
|
-
export { n as ActionContext, r as ActionContextOf, z as ActorConfig, x as ActorConfigSchema, q as ActorContext, s as ActorContextOf, m as ActorKey, l as ActorQuery, w as ActorTypes, t as AnyActorDefinition, v as AnyActorInstance, j as AnyClient, y as AuthIntent, C as Client, o as Conn, p as ConnectionStatus, I as InitContext, O as OnConnectOptions, K as Registry, G as RegistryActors, F as RegistryConfig, J as RegistryConfigSchema, H as RunConfigInput, k as createClientWithDriver, h as generateConnId, i as generateConnToken, u as lookupInRegistry, L as setup, B as test } from './conn-
|
|
1
|
+
import { U as UniversalWebSocket, R as RivetEvent, a as RivetCloseEvent, b as RivetMessageEvent, A as ActorDriver, c as RunnerConfig, E as Encoding, d as AnyDatabaseProvider, e as Actions, f as ActorConfigInput, g as ActorDefinition, D as DriverConfig } from './conn-CT_8ZBT_.cjs';
|
|
2
|
+
export { n as ActionContext, r as ActionContextOf, z as ActorConfig, x as ActorConfigSchema, q as ActorContext, s as ActorContextOf, m as ActorKey, l as ActorQuery, w as ActorTypes, t as AnyActorDefinition, v as AnyActorInstance, j as AnyClient, y as AuthIntent, C as Client, o as Conn, p as ConnectionStatus, I as InitContext, O as OnConnectOptions, K as Registry, G as RegistryActors, F as RegistryConfig, J as RegistryConfigSchema, H as RunConfigInput, S as ServerlessActorDriverBuilder, k as createClientWithDriver, h as generateConnId, i as generateConnToken, u as lookupInRegistry, L as setup, B as test } from './conn-CT_8ZBT_.cjs';
|
|
3
3
|
import { WSContext } from 'hono/ws';
|
|
4
4
|
export { n as noopNext } from './utils-fwx3o3K9.cjs';
|
|
5
|
-
import * as hono_types from 'hono/types';
|
|
6
|
-
import { Hono } from 'hono';
|
|
7
|
-
import { z } from 'zod';
|
|
8
5
|
export { toUint8Array } from './utils.cjs';
|
|
9
6
|
export { A as ALLOWED_PUBLIC_HEADERS, P as PATH_CONNECT_WEBSOCKET, a as PATH_RAW_WEBSOCKET_PREFIX } from './actor-router-consts-B3Lu87yJ.cjs';
|
|
10
7
|
export { UserError, UserErrorOptions } from './actor/errors.cjs';
|
|
8
|
+
import { Hono } from 'hono';
|
|
11
9
|
import 'hono/streaming';
|
|
10
|
+
import 'zod';
|
|
12
11
|
import 'pino';
|
|
13
12
|
import 'nanoevents';
|
|
14
13
|
import 'zod/v4';
|
|
@@ -96,7 +95,7 @@ declare class InlineWebSocketAdapter2 implements UniversalWebSocket {
|
|
|
96
95
|
/**
|
|
97
96
|
* Creates a WebSocket connection handler
|
|
98
97
|
*/
|
|
99
|
-
declare function handleWebSocketConnect(req: Request | undefined, runConfig:
|
|
98
|
+
declare function handleWebSocketConnect(req: Request | undefined, runConfig: RunnerConfig, actorDriver: ActorDriver, actorId: string, encoding: Encoding, parameters: unknown, connId?: string, connToken?: string): Promise<UpgradeWebSocketArgs>;
|
|
100
99
|
declare function handleRawWebSocketHandler(req: Request | undefined, path: string, actorDriver: ActorDriver, actorId: string): Promise<UpgradeWebSocketArgs>;
|
|
101
100
|
|
|
102
101
|
interface ActorRouterBindings {
|
|
@@ -108,45 +107,15 @@ type ActorRouter = Hono<{
|
|
|
108
107
|
/**
|
|
109
108
|
* Creates a router that runs on the partitioned instance.
|
|
110
109
|
*/
|
|
111
|
-
declare function createActorRouter(runConfig:
|
|
110
|
+
declare function createActorRouter(runConfig: RunnerConfig, actorDriver: ActorDriver, isTest: boolean): ActorRouter;
|
|
112
111
|
|
|
113
112
|
declare function actor<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TActions extends Actions<TState, TConnParams, TConnState, TVars, TInput, TDatabase>>(input: ActorConfigInput<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TActions>): ActorDefinition<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TActions>;
|
|
114
113
|
|
|
115
|
-
declare
|
|
116
|
-
app: z.ZodOptional<z.ZodType<Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">, z.ZodTypeDef, Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">>>;
|
|
117
|
-
endpoint: z.ZodDefault<z.ZodString>;
|
|
118
|
-
token: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
119
|
-
pegboardEndpoint: z.ZodOptional<z.ZodString>;
|
|
120
|
-
namespace: z.ZodDefault<z.ZodString>;
|
|
121
|
-
runnerName: z.ZodDefault<z.ZodString>;
|
|
122
|
-
runnerKey: z.ZodDefault<z.ZodString>;
|
|
123
|
-
totalSlots: z.ZodDefault<z.ZodNumber>;
|
|
124
|
-
}, "strip", z.ZodTypeAny, {
|
|
125
|
-
totalSlots: number;
|
|
126
|
-
endpoint: string;
|
|
127
|
-
namespace: string;
|
|
128
|
-
runnerName: string;
|
|
129
|
-
runnerKey: string;
|
|
130
|
-
token?: string | undefined;
|
|
131
|
-
app?: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/"> | undefined;
|
|
132
|
-
pegboardEndpoint?: string | undefined;
|
|
133
|
-
}, {
|
|
134
|
-
token?: string | undefined;
|
|
135
|
-
totalSlots?: number | undefined;
|
|
136
|
-
endpoint?: string | undefined;
|
|
137
|
-
namespace?: string | undefined;
|
|
138
|
-
runnerName?: string | undefined;
|
|
139
|
-
app?: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/"> | undefined;
|
|
140
|
-
pegboardEndpoint?: string | undefined;
|
|
141
|
-
runnerKey?: string | undefined;
|
|
142
|
-
}>>;
|
|
143
|
-
type InputConfig = z.input<typeof ConfigSchema>;
|
|
144
|
-
|
|
145
|
-
declare function createEngineDriver(inputConfig?: InputConfig): DriverConfig;
|
|
114
|
+
declare function createEngineDriver(): DriverConfig;
|
|
146
115
|
|
|
147
116
|
declare function createFileSystemDriver(opts?: {
|
|
148
117
|
path?: string;
|
|
149
118
|
}): DriverConfig;
|
|
150
119
|
declare function createMemoryDriver(): DriverConfig;
|
|
151
120
|
|
|
152
|
-
export { Actions, ActorConfigInput, ActorDefinition, type ActorRouter, DriverConfig, Encoding, InlineWebSocketAdapter2, RivetCloseEvent, RivetEvent, RivetMessageEvent, RunConfig, type UniversalErrorEvent, type UniversalEvent, type UniversalEventSource, type UniversalMessageEvent, UniversalWebSocket, type UpgradeWebSocketArgs, actor, createActorRouter, createEngineDriver, createFileSystemDriver, createMemoryDriver, handleRawWebSocketHandler, handleWebSocketConnect };
|
|
121
|
+
export { Actions, ActorConfigInput, ActorDefinition, type ActorRouter, DriverConfig, Encoding, InlineWebSocketAdapter2, RivetCloseEvent, RivetEvent, RivetMessageEvent, RunnerConfig as RunConfig, type UniversalErrorEvent, type UniversalEvent, type UniversalEventSource, type UniversalMessageEvent, UniversalWebSocket, type UpgradeWebSocketArgs, actor, createActorRouter, createEngineDriver, createFileSystemDriver, createMemoryDriver, handleRawWebSocketHandler, handleWebSocketConnect };
|
package/dist/tsup/mod.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { U as UniversalWebSocket, R as RivetEvent, a as RivetCloseEvent, b as RivetMessageEvent, A as ActorDriver, c as
|
|
2
|
-
export { n as ActionContext, r as ActionContextOf, z as ActorConfig, x as ActorConfigSchema, q as ActorContext, s as ActorContextOf, m as ActorKey, l as ActorQuery, w as ActorTypes, t as AnyActorDefinition, v as AnyActorInstance, j as AnyClient, y as AuthIntent, C as Client, o as Conn, p as ConnectionStatus, I as InitContext, O as OnConnectOptions, K as Registry, G as RegistryActors, F as RegistryConfig, J as RegistryConfigSchema, H as RunConfigInput, k as createClientWithDriver, h as generateConnId, i as generateConnToken, u as lookupInRegistry, L as setup, B as test } from './conn-
|
|
1
|
+
import { U as UniversalWebSocket, R as RivetEvent, a as RivetCloseEvent, b as RivetMessageEvent, A as ActorDriver, c as RunnerConfig, E as Encoding, d as AnyDatabaseProvider, e as Actions, f as ActorConfigInput, g as ActorDefinition, D as DriverConfig } from './conn-d5F0M95s.js';
|
|
2
|
+
export { n as ActionContext, r as ActionContextOf, z as ActorConfig, x as ActorConfigSchema, q as ActorContext, s as ActorContextOf, m as ActorKey, l as ActorQuery, w as ActorTypes, t as AnyActorDefinition, v as AnyActorInstance, j as AnyClient, y as AuthIntent, C as Client, o as Conn, p as ConnectionStatus, I as InitContext, O as OnConnectOptions, K as Registry, G as RegistryActors, F as RegistryConfig, J as RegistryConfigSchema, H as RunConfigInput, S as ServerlessActorDriverBuilder, k as createClientWithDriver, h as generateConnId, i as generateConnToken, u as lookupInRegistry, L as setup, B as test } from './conn-d5F0M95s.js';
|
|
3
3
|
import { WSContext } from 'hono/ws';
|
|
4
4
|
export { n as noopNext } from './utils-fwx3o3K9.js';
|
|
5
|
-
import * as hono_types from 'hono/types';
|
|
6
|
-
import { Hono } from 'hono';
|
|
7
|
-
import { z } from 'zod';
|
|
8
5
|
export { toUint8Array } from './utils.js';
|
|
9
6
|
export { A as ALLOWED_PUBLIC_HEADERS, P as PATH_CONNECT_WEBSOCKET, a as PATH_RAW_WEBSOCKET_PREFIX } from './actor-router-consts-B3Lu87yJ.js';
|
|
10
7
|
export { UserError, UserErrorOptions } from './actor/errors.js';
|
|
8
|
+
import { Hono } from 'hono';
|
|
11
9
|
import 'hono/streaming';
|
|
10
|
+
import 'zod';
|
|
12
11
|
import 'pino';
|
|
13
12
|
import 'nanoevents';
|
|
14
13
|
import 'zod/v4';
|
|
@@ -96,7 +95,7 @@ declare class InlineWebSocketAdapter2 implements UniversalWebSocket {
|
|
|
96
95
|
/**
|
|
97
96
|
* Creates a WebSocket connection handler
|
|
98
97
|
*/
|
|
99
|
-
declare function handleWebSocketConnect(req: Request | undefined, runConfig:
|
|
98
|
+
declare function handleWebSocketConnect(req: Request | undefined, runConfig: RunnerConfig, actorDriver: ActorDriver, actorId: string, encoding: Encoding, parameters: unknown, connId?: string, connToken?: string): Promise<UpgradeWebSocketArgs>;
|
|
100
99
|
declare function handleRawWebSocketHandler(req: Request | undefined, path: string, actorDriver: ActorDriver, actorId: string): Promise<UpgradeWebSocketArgs>;
|
|
101
100
|
|
|
102
101
|
interface ActorRouterBindings {
|
|
@@ -108,45 +107,15 @@ type ActorRouter = Hono<{
|
|
|
108
107
|
/**
|
|
109
108
|
* Creates a router that runs on the partitioned instance.
|
|
110
109
|
*/
|
|
111
|
-
declare function createActorRouter(runConfig:
|
|
110
|
+
declare function createActorRouter(runConfig: RunnerConfig, actorDriver: ActorDriver, isTest: boolean): ActorRouter;
|
|
112
111
|
|
|
113
112
|
declare function actor<TState, TConnParams, TConnState, TVars, TInput, TDatabase extends AnyDatabaseProvider, TActions extends Actions<TState, TConnParams, TConnState, TVars, TInput, TDatabase>>(input: ActorConfigInput<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TActions>): ActorDefinition<TState, TConnParams, TConnState, TVars, TInput, TDatabase, TActions>;
|
|
114
113
|
|
|
115
|
-
declare
|
|
116
|
-
app: z.ZodOptional<z.ZodType<Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">, z.ZodTypeDef, Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">>>;
|
|
117
|
-
endpoint: z.ZodDefault<z.ZodString>;
|
|
118
|
-
token: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
|
|
119
|
-
pegboardEndpoint: z.ZodOptional<z.ZodString>;
|
|
120
|
-
namespace: z.ZodDefault<z.ZodString>;
|
|
121
|
-
runnerName: z.ZodDefault<z.ZodString>;
|
|
122
|
-
runnerKey: z.ZodDefault<z.ZodString>;
|
|
123
|
-
totalSlots: z.ZodDefault<z.ZodNumber>;
|
|
124
|
-
}, "strip", z.ZodTypeAny, {
|
|
125
|
-
totalSlots: number;
|
|
126
|
-
endpoint: string;
|
|
127
|
-
namespace: string;
|
|
128
|
-
runnerName: string;
|
|
129
|
-
runnerKey: string;
|
|
130
|
-
token?: string | undefined;
|
|
131
|
-
app?: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/"> | undefined;
|
|
132
|
-
pegboardEndpoint?: string | undefined;
|
|
133
|
-
}, {
|
|
134
|
-
token?: string | undefined;
|
|
135
|
-
totalSlots?: number | undefined;
|
|
136
|
-
endpoint?: string | undefined;
|
|
137
|
-
namespace?: string | undefined;
|
|
138
|
-
runnerName?: string | undefined;
|
|
139
|
-
app?: Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/"> | undefined;
|
|
140
|
-
pegboardEndpoint?: string | undefined;
|
|
141
|
-
runnerKey?: string | undefined;
|
|
142
|
-
}>>;
|
|
143
|
-
type InputConfig = z.input<typeof ConfigSchema>;
|
|
144
|
-
|
|
145
|
-
declare function createEngineDriver(inputConfig?: InputConfig): DriverConfig;
|
|
114
|
+
declare function createEngineDriver(): DriverConfig;
|
|
146
115
|
|
|
147
116
|
declare function createFileSystemDriver(opts?: {
|
|
148
117
|
path?: string;
|
|
149
118
|
}): DriverConfig;
|
|
150
119
|
declare function createMemoryDriver(): DriverConfig;
|
|
151
120
|
|
|
152
|
-
export { Actions, ActorConfigInput, ActorDefinition, type ActorRouter, DriverConfig, Encoding, InlineWebSocketAdapter2, RivetCloseEvent, RivetEvent, RivetMessageEvent, RunConfig, type UniversalErrorEvent, type UniversalEvent, type UniversalEventSource, type UniversalMessageEvent, UniversalWebSocket, type UpgradeWebSocketArgs, actor, createActorRouter, createEngineDriver, createFileSystemDriver, createMemoryDriver, handleRawWebSocketHandler, handleWebSocketConnect };
|
|
121
|
+
export { Actions, ActorConfigInput, ActorDefinition, type ActorRouter, DriverConfig, Encoding, InlineWebSocketAdapter2, RivetCloseEvent, RivetEvent, RivetMessageEvent, RunnerConfig as RunConfig, type UniversalErrorEvent, type UniversalEvent, type UniversalEventSource, type UniversalMessageEvent, UniversalWebSocket, type UpgradeWebSocketArgs, actor, createActorRouter, createEngineDriver, createFileSystemDriver, createMemoryDriver, handleRawWebSocketHandler, handleWebSocketConnect };
|
package/dist/tsup/mod.js
CHANGED
|
@@ -10,27 +10,27 @@ import {
|
|
|
10
10
|
handleRawWebSocketHandler,
|
|
11
11
|
handleWebSocketConnect,
|
|
12
12
|
setup
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-NOXYAPM2.js";
|
|
14
|
+
import "./chunk-MIP4PYTD.js";
|
|
15
15
|
import {
|
|
16
16
|
createClientWithDriver,
|
|
17
17
|
generateConnId,
|
|
18
18
|
generateConnToken,
|
|
19
19
|
lookupInRegistry
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-MT5ES4XD.js";
|
|
21
|
+
import "./chunk-JTWD6ZT2.js";
|
|
22
|
+
import "./chunk-SBUJ3KIM.js";
|
|
23
|
+
import "./chunk-OHSP4BUE.js";
|
|
24
24
|
import {
|
|
25
25
|
ALLOWED_PUBLIC_HEADERS,
|
|
26
26
|
PATH_CONNECT_WEBSOCKET,
|
|
27
27
|
PATH_RAW_WEBSOCKET_PREFIX
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-AZI2T6UF.js";
|
|
29
|
+
import "./chunk-7DCESQ4O.js";
|
|
30
30
|
import {
|
|
31
31
|
noopNext,
|
|
32
32
|
toUint8Array
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-NQFIZSTR.js";
|
|
34
34
|
import {
|
|
35
35
|
UserError
|
|
36
36
|
} from "./chunk-YPZFLUO6.js";
|
package/dist/tsup/test/mod.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
7
|
-
require('../chunk-
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
11
|
-
require('../chunk-
|
|
12
|
-
require('../chunk-
|
|
13
|
-
require('../chunk-
|
|
4
|
+
var _chunkHDCLOVOEcjs = require('../chunk-HDCLOVOE.cjs');
|
|
5
|
+
require('../chunk-LXFOO25H.cjs');
|
|
6
|
+
require('../chunk-765F7ILI.cjs');
|
|
7
|
+
require('../chunk-O7BIBANW.cjs');
|
|
8
|
+
require('../chunk-I6AVFIVY.cjs');
|
|
9
|
+
require('../chunk-WYTLLIJM.cjs');
|
|
10
|
+
require('../chunk-6PORXHSQ.cjs');
|
|
11
|
+
require('../chunk-5JZPEJVJ.cjs');
|
|
12
|
+
require('../chunk-5ABUOI3V.cjs');
|
|
13
|
+
require('../chunk-NLYAKGML.cjs');
|
|
14
14
|
require('../chunk-5QGQK44L.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
exports.getPort =
|
|
18
|
+
exports.getPort = _chunkHDCLOVOEcjs.getPort; exports.setupTest = _chunkHDCLOVOEcjs.setupTest;
|
|
19
19
|
//# sourceMappingURL=mod.cjs.map
|
package/dist/tsup/test/mod.d.cts
CHANGED
package/dist/tsup/test/mod.d.ts
CHANGED
package/dist/tsup/test/mod.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPort,
|
|
3
3
|
setupTest
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-XO7VX4MN.js";
|
|
5
|
+
import "../chunk-NOXYAPM2.js";
|
|
6
|
+
import "../chunk-MIP4PYTD.js";
|
|
7
|
+
import "../chunk-MT5ES4XD.js";
|
|
8
|
+
import "../chunk-JTWD6ZT2.js";
|
|
9
|
+
import "../chunk-SBUJ3KIM.js";
|
|
10
|
+
import "../chunk-OHSP4BUE.js";
|
|
11
|
+
import "../chunk-AZI2T6UF.js";
|
|
12
|
+
import "../chunk-7DCESQ4O.js";
|
|
13
|
+
import "../chunk-NQFIZSTR.js";
|
|
14
14
|
import "../chunk-YPZFLUO6.js";
|
|
15
15
|
export {
|
|
16
16
|
getPort,
|
package/dist/tsup/utils.cjs
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkNLYAKGMLcjs = require('./chunk-NLYAKGML.cjs');
|
|
15
15
|
require('./chunk-5QGQK44L.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
@@ -26,5 +26,5 @@ require('./chunk-5QGQK44L.cjs');
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
exports.SinglePromiseQueue =
|
|
29
|
+
exports.SinglePromiseQueue = _chunkNLYAKGMLcjs.SinglePromiseQueue; exports.VERSION = _chunkNLYAKGMLcjs.VERSION; exports.assertUnreachable = _chunkNLYAKGMLcjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkNLYAKGMLcjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkNLYAKGMLcjs.combineUrlPath; exports.dbg = _chunkNLYAKGMLcjs.dbg; exports.getEnvUniversal = _chunkNLYAKGMLcjs.getEnvUniversal; exports.httpUserAgent = _chunkNLYAKGMLcjs.httpUserAgent; exports.promiseWithResolvers = _chunkNLYAKGMLcjs.promiseWithResolvers; exports.setLongTimeout = _chunkNLYAKGMLcjs.setLongTimeout; exports.stringifyError = _chunkNLYAKGMLcjs.stringifyError; exports.toUint8Array = _chunkNLYAKGMLcjs.toUint8Array;
|
|
30
30
|
//# sourceMappingURL=utils.cjs.map
|
package/dist/tsup/utils.d.cts
CHANGED
|
@@ -5,6 +5,7 @@ import 'hono/utils/http-status';
|
|
|
5
5
|
declare const VERSION: string;
|
|
6
6
|
declare function httpUserAgent(): string;
|
|
7
7
|
type UpgradeWebSocket = (createEvents: (c: Context) => any) => Handler;
|
|
8
|
+
type GetUpgradeWebSocket = () => UpgradeWebSocket;
|
|
8
9
|
declare function getEnvUniversal(key: string): string | undefined;
|
|
9
10
|
declare function dbg<T>(x: T): T;
|
|
10
11
|
/**
|
|
@@ -60,4 +61,4 @@ declare function bufferToArrayBuffer(buf: Buffer | Uint8Array): ArrayBuffer;
|
|
|
60
61
|
*/
|
|
61
62
|
declare function combineUrlPath(endpoint: string, path: string, queryParams?: Record<string, string | undefined>): string;
|
|
62
63
|
|
|
63
|
-
export { type LongTimeoutHandle, SinglePromiseQueue, type UpgradeWebSocket, VERSION, bufferToArrayBuffer, combineUrlPath, dbg, getEnvUniversal, httpUserAgent, promiseWithResolvers, setLongTimeout, toUint8Array };
|
|
64
|
+
export { type GetUpgradeWebSocket, type LongTimeoutHandle, SinglePromiseQueue, type UpgradeWebSocket, VERSION, bufferToArrayBuffer, combineUrlPath, dbg, getEnvUniversal, httpUserAgent, promiseWithResolvers, setLongTimeout, toUint8Array };
|
package/dist/tsup/utils.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import 'hono/utils/http-status';
|
|
|
5
5
|
declare const VERSION: string;
|
|
6
6
|
declare function httpUserAgent(): string;
|
|
7
7
|
type UpgradeWebSocket = (createEvents: (c: Context) => any) => Handler;
|
|
8
|
+
type GetUpgradeWebSocket = () => UpgradeWebSocket;
|
|
8
9
|
declare function getEnvUniversal(key: string): string | undefined;
|
|
9
10
|
declare function dbg<T>(x: T): T;
|
|
10
11
|
/**
|
|
@@ -60,4 +61,4 @@ declare function bufferToArrayBuffer(buf: Buffer | Uint8Array): ArrayBuffer;
|
|
|
60
61
|
*/
|
|
61
62
|
declare function combineUrlPath(endpoint: string, path: string, queryParams?: Record<string, string | undefined>): string;
|
|
62
63
|
|
|
63
|
-
export { type LongTimeoutHandle, SinglePromiseQueue, type UpgradeWebSocket, VERSION, bufferToArrayBuffer, combineUrlPath, dbg, getEnvUniversal, httpUserAgent, promiseWithResolvers, setLongTimeout, toUint8Array };
|
|
64
|
+
export { type GetUpgradeWebSocket, type LongTimeoutHandle, SinglePromiseQueue, type UpgradeWebSocket, VERSION, bufferToArrayBuffer, combineUrlPath, dbg, getEnvUniversal, httpUserAgent, promiseWithResolvers, setLongTimeout, toUint8Array };
|
package/dist/tsup/utils.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rivetkit",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.11",
|
|
4
4
|
"description": "Lightweight libraries for building stateful actors on edge platforms",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -155,15 +155,15 @@
|
|
|
155
155
|
"@bare-ts/lib": "~0.3.0",
|
|
156
156
|
"@hono/standard-validator": "^0.1.3",
|
|
157
157
|
"@hono/zod-openapi": "^0.19.10",
|
|
158
|
-
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@
|
|
158
|
+
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@76c2e031",
|
|
159
159
|
"@rivetkit/fast-json-patch": "^3.1.2",
|
|
160
160
|
"cbor-x": "^1.6.0",
|
|
161
161
|
"hono": "^4.7.0",
|
|
162
162
|
"invariant": "^2.2.4",
|
|
163
163
|
"nanoevents": "^9.1.0",
|
|
164
164
|
"on-change": "^5.0.1",
|
|
165
|
-
"pino": "^9.5.0",
|
|
166
165
|
"p-retry": "^6.2.1",
|
|
166
|
+
"pino": "^9.5.0",
|
|
167
167
|
"zod": "^3.25.76"
|
|
168
168
|
},
|
|
169
169
|
"devDependencies": {
|
|
@@ -180,8 +180,7 @@
|
|
|
180
180
|
"tsx": "^4.19.4",
|
|
181
181
|
"typescript": "^5.7.3",
|
|
182
182
|
"vitest": "^3.1.1",
|
|
183
|
-
"ws": "^8.18.1"
|
|
184
|
-
"bufferutil": "^4.0.9"
|
|
183
|
+
"ws": "^8.18.1"
|
|
185
184
|
},
|
|
186
185
|
"peerDependencies": {
|
|
187
186
|
"@hono/node-server": "^1.14.0",
|
package/src/actor/driver.ts
CHANGED
|
@@ -2,12 +2,12 @@ import type { Context as HonoContext } from "hono";
|
|
|
2
2
|
import type { AnyClient } from "@/client/client";
|
|
3
3
|
import type { ManagerDriver } from "@/manager/driver";
|
|
4
4
|
import type { RegistryConfig } from "@/registry/config";
|
|
5
|
-
import type {
|
|
5
|
+
import type { RunnerConfig } from "@/registry/run-config";
|
|
6
6
|
import type { AnyActorInstance } from "./instance";
|
|
7
7
|
|
|
8
8
|
export type ActorDriverBuilder = (
|
|
9
9
|
registryConfig: RegistryConfig,
|
|
10
|
-
runConfig:
|
|
10
|
+
runConfig: RunnerConfig,
|
|
11
11
|
managerDriver: ManagerDriver,
|
|
12
12
|
inlineClient: AnyClient,
|
|
13
13
|
) => ActorDriver;
|
|
@@ -123,9 +123,81 @@ export function encodeDataToString(message: OutputData): string {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
function base64DecodeToUint8Array(base64: string): Uint8Array {
|
|
127
|
+
// Check if Buffer is available (Node.js)
|
|
128
|
+
if (typeof Buffer !== "undefined") {
|
|
129
|
+
return new Uint8Array(Buffer.from(base64, "base64"));
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Browser environment - use atob
|
|
133
|
+
const binary = atob(base64);
|
|
134
|
+
const len = binary.length;
|
|
135
|
+
const bytes = new Uint8Array(len);
|
|
136
|
+
for (let i = 0; i < len; i++) {
|
|
137
|
+
bytes[i] = binary.charCodeAt(i);
|
|
138
|
+
}
|
|
139
|
+
return bytes;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function base64DecodeToArrayBuffer(base64: string): ArrayBuffer {
|
|
143
|
+
return base64DecodeToUint8Array(base64).buffer as ArrayBuffer;
|
|
144
|
+
}
|
|
145
|
+
|
|
126
146
|
/** Stringifies with compat for values that BARE & CBOR supports. */
|
|
127
147
|
export function jsonStringifyCompat(input: any): string {
|
|
128
|
-
return JSON.stringify(input, (_key, value) =>
|
|
129
|
-
typeof value === "bigint"
|
|
130
|
-
|
|
148
|
+
return JSON.stringify(input, (_key, value) => {
|
|
149
|
+
if (typeof value === "bigint") {
|
|
150
|
+
return ["$BigInt", value.toString()];
|
|
151
|
+
} else if (value instanceof ArrayBuffer) {
|
|
152
|
+
return ["$ArrayBuffer", base64EncodeArrayBuffer(value)];
|
|
153
|
+
} else if (value instanceof Uint8Array) {
|
|
154
|
+
return ["$Uint8Array", base64EncodeUint8Array(value)];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Escape user arrays that start with $ by prepending another $
|
|
158
|
+
if (
|
|
159
|
+
Array.isArray(value) &&
|
|
160
|
+
value.length === 2 &&
|
|
161
|
+
typeof value[0] === "string" &&
|
|
162
|
+
value[0].startsWith("$")
|
|
163
|
+
) {
|
|
164
|
+
return ["$" + value[0], value[1]];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return value;
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/** Parses JSON with compat for values that BARE & CBOR supports. */
|
|
172
|
+
export function jsonParseCompat(input: string): any {
|
|
173
|
+
return JSON.parse(input, (_key, value) => {
|
|
174
|
+
// Handle arrays with $ prefix
|
|
175
|
+
if (
|
|
176
|
+
Array.isArray(value) &&
|
|
177
|
+
value.length === 2 &&
|
|
178
|
+
typeof value[0] === "string" &&
|
|
179
|
+
value[0].startsWith("$")
|
|
180
|
+
) {
|
|
181
|
+
// Known special types
|
|
182
|
+
if (value[0] === "$BigInt") {
|
|
183
|
+
return BigInt(value[1]);
|
|
184
|
+
} else if (value[0] === "$ArrayBuffer") {
|
|
185
|
+
return base64DecodeToArrayBuffer(value[1]);
|
|
186
|
+
} else if (value[0] === "$Uint8Array") {
|
|
187
|
+
return base64DecodeToUint8Array(value[1]);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Unescape user arrays that started with $ ($$foo -> $foo)
|
|
191
|
+
if (value[0].startsWith("$$")) {
|
|
192
|
+
return [value[0].substring(1), value[1]];
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Unknown type starting with $ - this is an error
|
|
196
|
+
throw new Error(
|
|
197
|
+
`Unknown JSON encoding type: ${value[0]}. This may indicate corrupted data or a version mismatch.`,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return value;
|
|
202
|
+
});
|
|
131
203
|
}
|