rivetkit 2.0.10 → 2.0.12

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.
Files changed (74) hide show
  1. package/dist/tsup/{chunk-PPLR53PP.cjs → chunk-2WEKN2GP.cjs} +3 -3
  2. package/dist/tsup/{chunk-PPLR53PP.cjs.map → chunk-2WEKN2GP.cjs.map} +1 -1
  3. package/dist/tsup/{chunk-SIWYIRXP.cjs → chunk-3H2GFGYN.cjs} +3 -3
  4. package/dist/tsup/{chunk-SIWYIRXP.cjs.map → chunk-3H2GFGYN.cjs.map} +1 -1
  5. package/dist/tsup/{chunk-YKVTF7MP.cjs → chunk-4NPHS4GT.cjs} +7 -7
  6. package/dist/tsup/{chunk-YKVTF7MP.cjs.map → chunk-4NPHS4GT.cjs.map} +1 -1
  7. package/dist/tsup/{chunk-GIFHYL7A.cjs → chunk-63AELL54.cjs} +3 -3
  8. package/dist/tsup/{chunk-GIFHYL7A.cjs.map → chunk-63AELL54.cjs.map} +1 -1
  9. package/dist/tsup/{chunk-MLQIYKAZ.js → chunk-AOWJK5JM.js} +3 -3
  10. package/dist/tsup/{chunk-KL4V2ULR.js → chunk-DSJ7EWMA.js} +2 -2
  11. package/dist/tsup/{chunk-346X2XU4.js → chunk-DYXH4LQ3.js} +2 -2
  12. package/dist/tsup/{chunk-CA3X5M6H.cjs → chunk-FFLADW7R.cjs} +26 -26
  13. package/dist/tsup/chunk-FFLADW7R.cjs.map +1 -0
  14. package/dist/tsup/{chunk-VJRXZPTT.js → chunk-FXGRLLVS.js} +40 -17
  15. package/dist/tsup/chunk-FXGRLLVS.js.map +1 -0
  16. package/dist/tsup/{chunk-PSCDCEXM.cjs → chunk-HVSEPT2G.cjs} +13 -13
  17. package/dist/tsup/{chunk-PSCDCEXM.cjs.map → chunk-HVSEPT2G.cjs.map} +1 -1
  18. package/dist/tsup/{chunk-PDFL7FBL.cjs → chunk-KQGXJTBM.cjs} +198 -175
  19. package/dist/tsup/chunk-KQGXJTBM.cjs.map +1 -0
  20. package/dist/tsup/{chunk-KGDZYQYE.js → chunk-LD3574QQ.js} +2 -2
  21. package/dist/tsup/{chunk-7E5K3375.js → chunk-LO6XS2NJ.js} +2 -2
  22. package/dist/tsup/{chunk-N3A5GYJU.js → chunk-O7SCSVV5.js} +3 -3
  23. package/dist/tsup/{chunk-DVPXSB4B.cjs → chunk-QSWYPQ5Y.cjs} +12 -12
  24. package/dist/tsup/{chunk-DVPXSB4B.cjs.map → chunk-QSWYPQ5Y.cjs.map} +1 -1
  25. package/dist/tsup/{chunk-I3FB346I.cjs → chunk-RQGVUYBU.cjs} +8 -8
  26. package/dist/tsup/{chunk-I3FB346I.cjs.map → chunk-RQGVUYBU.cjs.map} +1 -1
  27. package/dist/tsup/{chunk-HI55LHM3.js → chunk-TGMO7RD4.js} +3 -3
  28. package/dist/tsup/chunk-TGMO7RD4.js.map +1 -0
  29. package/dist/tsup/{chunk-KH5WFDUK.cjs → chunk-VYQFZNPT.cjs} +6 -6
  30. package/dist/tsup/{chunk-KH5WFDUK.cjs.map → chunk-VYQFZNPT.cjs.map} +1 -1
  31. package/dist/tsup/{chunk-H7E2UU23.js → chunk-X5I7MG2C.js} +7 -7
  32. package/dist/tsup/{chunk-R2S45MO6.js → chunk-XIR6UKM2.js} +6 -6
  33. package/dist/tsup/{chunk-VZMXAZKC.cjs → chunk-YLCZ3HD7.cjs} +206 -206
  34. package/dist/tsup/{chunk-VZMXAZKC.cjs.map → chunk-YLCZ3HD7.cjs.map} +1 -1
  35. package/dist/tsup/{chunk-QRFXXTLG.js → chunk-YSIN4LW4.js} +5 -5
  36. package/dist/tsup/{chunk-CA3X5M6H.cjs.map → chunk-YSIN4LW4.js.map} +1 -1
  37. package/dist/tsup/client/mod.cjs +9 -9
  38. package/dist/tsup/client/mod.js +8 -8
  39. package/dist/tsup/common/log.cjs +3 -3
  40. package/dist/tsup/common/log.js +2 -2
  41. package/dist/tsup/common/websocket.cjs +4 -4
  42. package/dist/tsup/common/websocket.js +3 -3
  43. package/dist/tsup/driver-helpers/mod.cjs +5 -5
  44. package/dist/tsup/driver-helpers/mod.js +4 -4
  45. package/dist/tsup/driver-test-suite/mod.cjs +71 -71
  46. package/dist/tsup/driver-test-suite/mod.cjs.map +1 -1
  47. package/dist/tsup/driver-test-suite/mod.js +12 -12
  48. package/dist/tsup/driver-test-suite/mod.js.map +1 -1
  49. package/dist/tsup/inspector/mod.cjs +6 -6
  50. package/dist/tsup/inspector/mod.js +5 -5
  51. package/dist/tsup/mod.cjs +10 -10
  52. package/dist/tsup/mod.js +9 -9
  53. package/dist/tsup/test/mod.cjs +11 -11
  54. package/dist/tsup/test/mod.js +10 -10
  55. package/dist/tsup/utils.cjs +2 -2
  56. package/dist/tsup/utils.js +1 -1
  57. package/package.json +2 -2
  58. package/src/client/config.ts +1 -1
  59. package/src/driver-test-suite/mod.ts +1 -1
  60. package/src/drivers/engine/actor-driver.ts +2 -0
  61. package/src/manager/router.ts +11 -6
  62. package/src/registry/mod.ts +31 -2
  63. package/dist/tsup/chunk-HI55LHM3.js.map +0 -1
  64. package/dist/tsup/chunk-PDFL7FBL.cjs.map +0 -1
  65. package/dist/tsup/chunk-QRFXXTLG.js.map +0 -1
  66. package/dist/tsup/chunk-VJRXZPTT.js.map +0 -1
  67. /package/dist/tsup/{chunk-MLQIYKAZ.js.map → chunk-AOWJK5JM.js.map} +0 -0
  68. /package/dist/tsup/{chunk-KL4V2ULR.js.map → chunk-DSJ7EWMA.js.map} +0 -0
  69. /package/dist/tsup/{chunk-346X2XU4.js.map → chunk-DYXH4LQ3.js.map} +0 -0
  70. /package/dist/tsup/{chunk-KGDZYQYE.js.map → chunk-LD3574QQ.js.map} +0 -0
  71. /package/dist/tsup/{chunk-7E5K3375.js.map → chunk-LO6XS2NJ.js.map} +0 -0
  72. /package/dist/tsup/{chunk-N3A5GYJU.js.map → chunk-O7SCSVV5.js.map} +0 -0
  73. /package/dist/tsup/{chunk-H7E2UU23.js.map → chunk-X5I7MG2C.js.map} +0 -0
  74. /package/dist/tsup/{chunk-R2S45MO6.js.map → chunk-XIR6UKM2.js.map} +0 -0
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkSIWYIRXPcjs = require('../chunk-SIWYIRXP.cjs');
9
+ var _chunk3H2GFGYNcjs = require('../chunk-3H2GFGYN.cjs');
10
10
 
11
11
 
12
12
 
@@ -27,10 +27,10 @@ var _chunkSIWYIRXPcjs = require('../chunk-SIWYIRXP.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkDVPXSB4Bcjs = require('../chunk-DVPXSB4B.cjs');
31
- require('../chunk-I3FB346I.cjs');
32
- require('../chunk-YKVTF7MP.cjs');
33
- require('../chunk-GIFHYL7A.cjs');
30
+ var _chunkQSWYPQ5Ycjs = require('../chunk-QSWYPQ5Y.cjs');
31
+ require('../chunk-RQGVUYBU.cjs');
32
+ require('../chunk-4NPHS4GT.cjs');
33
+ require('../chunk-63AELL54.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 = _chunkDVPXSB4Bcjs.ActorFeature; exports.ActorId = _chunkDVPXSB4Bcjs.ActorId; exports.ActorLogEntry = _chunkDVPXSB4Bcjs.ActorLogEntry; exports.ActorSchema = _chunkDVPXSB4Bcjs.ActorSchema; exports.BuildSchema = _chunkDVPXSB4Bcjs.BuildSchema; exports.BuildsSchema = _chunkDVPXSB4Bcjs.BuildsSchema; exports.ColumnSchema = _chunkDVPXSB4Bcjs.ColumnSchema; exports.ColumnsSchema = _chunkDVPXSB4Bcjs.ColumnsSchema; exports.ConnectionSchema = _chunkDVPXSB4Bcjs.ConnectionSchema; exports.CreateActorSchema = _chunkDVPXSB4Bcjs.CreateActorSchema; exports.DatabaseQuerySchema = _chunkDVPXSB4Bcjs.DatabaseQuerySchema; exports.ForeignKeySchema = _chunkDVPXSB4Bcjs.ForeignKeySchema; exports.ForeignKeysSchema = _chunkDVPXSB4Bcjs.ForeignKeysSchema; exports.OperationSchema = _chunkDVPXSB4Bcjs.OperationSchema; exports.PatchSchema = _chunkDVPXSB4Bcjs.PatchSchema; exports.RealtimeEventSchema = _chunkDVPXSB4Bcjs.RealtimeEventSchema; exports.RecordedRealtimeEventSchema = _chunkDVPXSB4Bcjs.RecordedRealtimeEventSchema; exports.TableSchema = _chunkDVPXSB4Bcjs.TableSchema; exports.TablesSchema = _chunkDVPXSB4Bcjs.TablesSchema; exports.compareSecrets = _chunkSIWYIRXPcjs.compareSecrets; exports.configureInspectorAccessToken = _chunkSIWYIRXPcjs.configureInspectorAccessToken; exports.createActorInspectorClient = _chunkSIWYIRXPcjs.createActorInspectorClient; exports.createManagerInspectorClient = _chunkSIWYIRXPcjs.createManagerInspectorClient; exports.getInspectorUrl = _chunkSIWYIRXPcjs.getInspectorUrl; exports.isInspectorEnabled = _chunkSIWYIRXPcjs.isInspectorEnabled; exports.secureInspector = _chunkSIWYIRXPcjs.secureInspector;
62
+ exports.ActorFeature = _chunkQSWYPQ5Ycjs.ActorFeature; exports.ActorId = _chunkQSWYPQ5Ycjs.ActorId; exports.ActorLogEntry = _chunkQSWYPQ5Ycjs.ActorLogEntry; exports.ActorSchema = _chunkQSWYPQ5Ycjs.ActorSchema; exports.BuildSchema = _chunkQSWYPQ5Ycjs.BuildSchema; exports.BuildsSchema = _chunkQSWYPQ5Ycjs.BuildsSchema; exports.ColumnSchema = _chunkQSWYPQ5Ycjs.ColumnSchema; exports.ColumnsSchema = _chunkQSWYPQ5Ycjs.ColumnsSchema; exports.ConnectionSchema = _chunkQSWYPQ5Ycjs.ConnectionSchema; exports.CreateActorSchema = _chunkQSWYPQ5Ycjs.CreateActorSchema; exports.DatabaseQuerySchema = _chunkQSWYPQ5Ycjs.DatabaseQuerySchema; exports.ForeignKeySchema = _chunkQSWYPQ5Ycjs.ForeignKeySchema; exports.ForeignKeysSchema = _chunkQSWYPQ5Ycjs.ForeignKeysSchema; exports.OperationSchema = _chunkQSWYPQ5Ycjs.OperationSchema; exports.PatchSchema = _chunkQSWYPQ5Ycjs.PatchSchema; exports.RealtimeEventSchema = _chunkQSWYPQ5Ycjs.RealtimeEventSchema; exports.RecordedRealtimeEventSchema = _chunkQSWYPQ5Ycjs.RecordedRealtimeEventSchema; exports.TableSchema = _chunkQSWYPQ5Ycjs.TableSchema; exports.TablesSchema = _chunkQSWYPQ5Ycjs.TablesSchema; exports.compareSecrets = _chunk3H2GFGYNcjs.compareSecrets; exports.configureInspectorAccessToken = _chunk3H2GFGYNcjs.configureInspectorAccessToken; exports.createActorInspectorClient = _chunk3H2GFGYNcjs.createActorInspectorClient; exports.createManagerInspectorClient = _chunk3H2GFGYNcjs.createManagerInspectorClient; exports.getInspectorUrl = _chunk3H2GFGYNcjs.getInspectorUrl; exports.isInspectorEnabled = _chunk3H2GFGYNcjs.isInspectorEnabled; exports.secureInspector = _chunk3H2GFGYNcjs.secureInspector;
63
63
  //# sourceMappingURL=mod.cjs.map
@@ -6,7 +6,7 @@ import {
6
6
  getInspectorUrl,
7
7
  isInspectorEnabled,
8
8
  secureInspector
9
- } from "../chunk-KL4V2ULR.js";
9
+ } from "../chunk-DSJ7EWMA.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-KGDZYQYE.js";
31
- import "../chunk-MLQIYKAZ.js";
32
- import "../chunk-7E5K3375.js";
33
- import "../chunk-HI55LHM3.js";
30
+ } from "../chunk-LD3574QQ.js";
31
+ import "../chunk-AOWJK5JM.js";
32
+ import "../chunk-LO6XS2NJ.js";
33
+ import "../chunk-TGMO7RD4.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 _chunkPDFL7FBLcjs = require('./chunk-PDFL7FBL.cjs');
14
- require('./chunk-SIWYIRXP.cjs');
13
+ var _chunkKQGXJTBMcjs = require('./chunk-KQGXJTBM.cjs');
14
+ require('./chunk-3H2GFGYN.cjs');
15
15
 
16
16
 
17
17
 
18
18
 
19
19
 
20
- var _chunkVZMXAZKCcjs = require('./chunk-VZMXAZKC.cjs');
21
- require('./chunk-DVPXSB4B.cjs');
22
- require('./chunk-PPLR53PP.cjs');
23
- require('./chunk-CA3X5M6H.cjs');
20
+ var _chunkYLCZ3HD7cjs = require('./chunk-YLCZ3HD7.cjs');
21
+ require('./chunk-QSWYPQ5Y.cjs');
22
+ require('./chunk-2WEKN2GP.cjs');
23
+ require('./chunk-FFLADW7R.cjs');
24
24
 
25
25
 
26
26
 
27
27
 
28
- var _chunkI3FB346Icjs = require('./chunk-I3FB346I.cjs');
29
- require('./chunk-YKVTF7MP.cjs');
28
+ var _chunkRQGVUYBUcjs = require('./chunk-RQGVUYBU.cjs');
29
+ require('./chunk-4NPHS4GT.cjs');
30
30
 
31
31
 
32
32
 
33
- var _chunkGIFHYL7Acjs = require('./chunk-GIFHYL7A.cjs');
33
+ var _chunk63AELL54cjs = require('./chunk-63AELL54.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 = _chunkI3FB346Icjs.ALLOWED_PUBLIC_HEADERS; exports.InlineWebSocketAdapter2 = _chunkPDFL7FBLcjs.InlineWebSocketAdapter2; exports.PATH_CONNECT_WEBSOCKET = _chunkI3FB346Icjs.PATH_CONNECT_WEBSOCKET; exports.PATH_RAW_WEBSOCKET_PREFIX = _chunkI3FB346Icjs.PATH_RAW_WEBSOCKET_PREFIX; exports.Registry = _chunkPDFL7FBLcjs.Registry; exports.RegistryConfigSchema = _chunkPDFL7FBLcjs.RegistryConfigSchema; exports.UserError = _chunk5QGQK44Lcjs.UserError; exports.actor = _chunkPDFL7FBLcjs.actor; exports.createActorRouter = _chunkPDFL7FBLcjs.createActorRouter; exports.createClientWithDriver = _chunkVZMXAZKCcjs.createClientWithDriver; exports.createEngineDriver = _chunkPDFL7FBLcjs.createEngineDriver; exports.createFileSystemDriver = _chunkPDFL7FBLcjs.createFileSystemDriver; exports.createMemoryDriver = _chunkPDFL7FBLcjs.createMemoryDriver; exports.generateConnId = _chunkVZMXAZKCcjs.generateConnId; exports.generateConnToken = _chunkVZMXAZKCcjs.generateConnToken; exports.handleRawWebSocketHandler = _chunkPDFL7FBLcjs.handleRawWebSocketHandler; exports.handleWebSocketConnect = _chunkPDFL7FBLcjs.handleWebSocketConnect; exports.lookupInRegistry = _chunkVZMXAZKCcjs.lookupInRegistry; exports.noopNext = _chunkGIFHYL7Acjs.noopNext; exports.setup = _chunkPDFL7FBLcjs.setup; exports.toUint8Array = _chunkGIFHYL7Acjs.toUint8Array;
59
+ exports.ALLOWED_PUBLIC_HEADERS = _chunkRQGVUYBUcjs.ALLOWED_PUBLIC_HEADERS; exports.InlineWebSocketAdapter2 = _chunkKQGXJTBMcjs.InlineWebSocketAdapter2; exports.PATH_CONNECT_WEBSOCKET = _chunkRQGVUYBUcjs.PATH_CONNECT_WEBSOCKET; exports.PATH_RAW_WEBSOCKET_PREFIX = _chunkRQGVUYBUcjs.PATH_RAW_WEBSOCKET_PREFIX; exports.Registry = _chunkKQGXJTBMcjs.Registry; exports.RegistryConfigSchema = _chunkKQGXJTBMcjs.RegistryConfigSchema; exports.UserError = _chunk5QGQK44Lcjs.UserError; exports.actor = _chunkKQGXJTBMcjs.actor; exports.createActorRouter = _chunkKQGXJTBMcjs.createActorRouter; exports.createClientWithDriver = _chunkYLCZ3HD7cjs.createClientWithDriver; exports.createEngineDriver = _chunkKQGXJTBMcjs.createEngineDriver; exports.createFileSystemDriver = _chunkKQGXJTBMcjs.createFileSystemDriver; exports.createMemoryDriver = _chunkKQGXJTBMcjs.createMemoryDriver; exports.generateConnId = _chunkYLCZ3HD7cjs.generateConnId; exports.generateConnToken = _chunkYLCZ3HD7cjs.generateConnToken; exports.handleRawWebSocketHandler = _chunkKQGXJTBMcjs.handleRawWebSocketHandler; exports.handleWebSocketConnect = _chunkKQGXJTBMcjs.handleWebSocketConnect; exports.lookupInRegistry = _chunkYLCZ3HD7cjs.lookupInRegistry; exports.noopNext = _chunk63AELL54cjs.noopNext; exports.setup = _chunkKQGXJTBMcjs.setup; exports.toUint8Array = _chunk63AELL54cjs.toUint8Array;
60
60
  //# sourceMappingURL=mod.cjs.map
package/dist/tsup/mod.js CHANGED
@@ -10,27 +10,27 @@ import {
10
10
  handleRawWebSocketHandler,
11
11
  handleWebSocketConnect,
12
12
  setup
13
- } from "./chunk-VJRXZPTT.js";
14
- import "./chunk-KL4V2ULR.js";
13
+ } from "./chunk-FXGRLLVS.js";
14
+ import "./chunk-DSJ7EWMA.js";
15
15
  import {
16
16
  createClientWithDriver,
17
17
  generateConnId,
18
18
  generateConnToken,
19
19
  lookupInRegistry
20
- } from "./chunk-H7E2UU23.js";
21
- import "./chunk-KGDZYQYE.js";
22
- import "./chunk-346X2XU4.js";
23
- import "./chunk-QRFXXTLG.js";
20
+ } from "./chunk-X5I7MG2C.js";
21
+ import "./chunk-LD3574QQ.js";
22
+ import "./chunk-DYXH4LQ3.js";
23
+ import "./chunk-YSIN4LW4.js";
24
24
  import {
25
25
  ALLOWED_PUBLIC_HEADERS,
26
26
  PATH_CONNECT_WEBSOCKET,
27
27
  PATH_RAW_WEBSOCKET_PREFIX
28
- } from "./chunk-MLQIYKAZ.js";
29
- import "./chunk-7E5K3375.js";
28
+ } from "./chunk-AOWJK5JM.js";
29
+ import "./chunk-LO6XS2NJ.js";
30
30
  import {
31
31
  noopNext,
32
32
  toUint8Array
33
- } from "./chunk-HI55LHM3.js";
33
+ } from "./chunk-TGMO7RD4.js";
34
34
  import {
35
35
  UserError
36
36
  } from "./chunk-YPZFLUO6.js";
@@ -1,19 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkPSCDCEXMcjs = require('../chunk-PSCDCEXM.cjs');
5
- require('../chunk-PDFL7FBL.cjs');
6
- require('../chunk-SIWYIRXP.cjs');
7
- require('../chunk-VZMXAZKC.cjs');
8
- require('../chunk-DVPXSB4B.cjs');
9
- require('../chunk-PPLR53PP.cjs');
10
- require('../chunk-CA3X5M6H.cjs');
11
- require('../chunk-I3FB346I.cjs');
12
- require('../chunk-YKVTF7MP.cjs');
13
- require('../chunk-GIFHYL7A.cjs');
4
+ var _chunkHVSEPT2Gcjs = require('../chunk-HVSEPT2G.cjs');
5
+ require('../chunk-KQGXJTBM.cjs');
6
+ require('../chunk-3H2GFGYN.cjs');
7
+ require('../chunk-YLCZ3HD7.cjs');
8
+ require('../chunk-QSWYPQ5Y.cjs');
9
+ require('../chunk-2WEKN2GP.cjs');
10
+ require('../chunk-FFLADW7R.cjs');
11
+ require('../chunk-RQGVUYBU.cjs');
12
+ require('../chunk-4NPHS4GT.cjs');
13
+ require('../chunk-63AELL54.cjs');
14
14
  require('../chunk-5QGQK44L.cjs');
15
15
 
16
16
 
17
17
 
18
- exports.getPort = _chunkPSCDCEXMcjs.getPort; exports.setupTest = _chunkPSCDCEXMcjs.setupTest;
18
+ exports.getPort = _chunkHVSEPT2Gcjs.getPort; exports.setupTest = _chunkHVSEPT2Gcjs.setupTest;
19
19
  //# sourceMappingURL=mod.cjs.map
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  getPort,
3
3
  setupTest
4
- } from "../chunk-R2S45MO6.js";
5
- import "../chunk-VJRXZPTT.js";
6
- import "../chunk-KL4V2ULR.js";
7
- import "../chunk-H7E2UU23.js";
8
- import "../chunk-KGDZYQYE.js";
9
- import "../chunk-346X2XU4.js";
10
- import "../chunk-QRFXXTLG.js";
11
- import "../chunk-MLQIYKAZ.js";
12
- import "../chunk-7E5K3375.js";
13
- import "../chunk-HI55LHM3.js";
4
+ } from "../chunk-XIR6UKM2.js";
5
+ import "../chunk-FXGRLLVS.js";
6
+ import "../chunk-DSJ7EWMA.js";
7
+ import "../chunk-X5I7MG2C.js";
8
+ import "../chunk-LD3574QQ.js";
9
+ import "../chunk-DYXH4LQ3.js";
10
+ import "../chunk-YSIN4LW4.js";
11
+ import "../chunk-AOWJK5JM.js";
12
+ import "../chunk-LO6XS2NJ.js";
13
+ import "../chunk-TGMO7RD4.js";
14
14
  import "../chunk-YPZFLUO6.js";
15
15
  export {
16
16
  getPort,
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkGIFHYL7Acjs = require('./chunk-GIFHYL7A.cjs');
14
+ var _chunk63AELL54cjs = require('./chunk-63AELL54.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 = _chunkGIFHYL7Acjs.SinglePromiseQueue; exports.VERSION = _chunkGIFHYL7Acjs.VERSION; exports.assertUnreachable = _chunkGIFHYL7Acjs.assertUnreachable; exports.bufferToArrayBuffer = _chunkGIFHYL7Acjs.bufferToArrayBuffer; exports.combineUrlPath = _chunkGIFHYL7Acjs.combineUrlPath; exports.dbg = _chunkGIFHYL7Acjs.dbg; exports.getEnvUniversal = _chunkGIFHYL7Acjs.getEnvUniversal; exports.httpUserAgent = _chunkGIFHYL7Acjs.httpUserAgent; exports.promiseWithResolvers = _chunkGIFHYL7Acjs.promiseWithResolvers; exports.setLongTimeout = _chunkGIFHYL7Acjs.setLongTimeout; exports.stringifyError = _chunkGIFHYL7Acjs.stringifyError; exports.toUint8Array = _chunkGIFHYL7Acjs.toUint8Array;
29
+ exports.SinglePromiseQueue = _chunk63AELL54cjs.SinglePromiseQueue; exports.VERSION = _chunk63AELL54cjs.VERSION; exports.assertUnreachable = _chunk63AELL54cjs.assertUnreachable; exports.bufferToArrayBuffer = _chunk63AELL54cjs.bufferToArrayBuffer; exports.combineUrlPath = _chunk63AELL54cjs.combineUrlPath; exports.dbg = _chunk63AELL54cjs.dbg; exports.getEnvUniversal = _chunk63AELL54cjs.getEnvUniversal; exports.httpUserAgent = _chunk63AELL54cjs.httpUserAgent; exports.promiseWithResolvers = _chunk63AELL54cjs.promiseWithResolvers; exports.setLongTimeout = _chunk63AELL54cjs.setLongTimeout; exports.stringifyError = _chunk63AELL54cjs.stringifyError; exports.toUint8Array = _chunk63AELL54cjs.toUint8Array;
30
30
  //# sourceMappingURL=utils.cjs.map
@@ -11,7 +11,7 @@ import {
11
11
  setLongTimeout,
12
12
  stringifyError,
13
13
  toUint8Array
14
- } from "./chunk-HI55LHM3.js";
14
+ } from "./chunk-TGMO7RD4.js";
15
15
  import "./chunk-YPZFLUO6.js";
16
16
  export {
17
17
  SinglePromiseQueue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rivetkit",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "Lightweight libraries for building stateful actors on edge platforms",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -155,7 +155,7 @@
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@76c2e031",
158
+ "@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@bdfca35",
159
159
  "@rivetkit/fast-json-patch": "^3.1.2",
160
160
  "cbor-x": "^1.6.0",
161
161
  "hono": "^4.7.0",
@@ -29,7 +29,7 @@ export const ClientConfigSchema = z.object({
29
29
  /** Name of the runner. This is used to group together runners in to different pools. */
30
30
  runnerName: z
31
31
  .string()
32
- .default(() => getEnvUniversal("RIVET_RUNNER") ?? "rivetkit"),
32
+ .default(() => getEnvUniversal("RIVET_RUNNER") ?? "default"),
33
33
 
34
34
  encoding: EncodingSchema.default("bare"),
35
35
 
@@ -272,7 +272,7 @@ export async function createTestRuntime(
272
272
  return {
273
273
  endpoint: serverEndpoint,
274
274
  namespace: "default",
275
- runnerName: "rivetkit",
275
+ runnerName: "default",
276
276
  cleanup,
277
277
  };
278
278
  }
@@ -411,6 +411,8 @@ export class EngineActorDriver implements ActorDriver {
411
411
  await this.#runnerStarted.promise;
412
412
 
413
413
  return streamSSE(c, async (stream) => {
414
+ stream.onAbort(() => this.shutdown(true));
415
+
414
416
  // Runner id should be set if the runner started
415
417
  const payload = this.#runner.getServerlessInitPacket();
416
418
  invariant(payload, "runnerId not set");
@@ -321,7 +321,9 @@ function addManagerRoutes(
321
321
  }
322
322
 
323
323
  return c.json<ActorsListResponse>({
324
- actors: actors.map(createApiActor),
324
+ actors: actors.map((actor) =>
325
+ createApiActor(actor, runConfig.runnerName),
326
+ ),
325
327
  });
326
328
  });
327
329
  }
@@ -355,7 +357,7 @@ function addManagerRoutes(
355
357
 
356
358
  if (existingActor) {
357
359
  return c.json<ActorsGetOrCreateResponse>({
358
- actor: createApiActor(existingActor),
360
+ actor: createApiActor(existingActor, runConfig.runnerName),
359
361
  created: false,
360
362
  });
361
363
  }
@@ -372,7 +374,7 @@ function addManagerRoutes(
372
374
  });
373
375
 
374
376
  return c.json<ActorsGetOrCreateResponse>({
375
- actor: createApiActor(newActor),
377
+ actor: createApiActor(newActor, runConfig.runnerName),
376
378
  created: true,
377
379
  });
378
380
  });
@@ -410,7 +412,7 @@ function addManagerRoutes(
410
412
  });
411
413
 
412
414
  // Transform ActorOutput to match ActorSchema
413
- const actor = createApiActor(actorOutput);
415
+ const actor = createApiActor(actorOutput, runConfig.runnerName);
414
416
 
415
417
  return c.json<ActorsCreateResponse>({ actor });
416
418
  });
@@ -655,13 +657,16 @@ function addManagerRoutes(
655
657
  );
656
658
  }
657
659
 
658
- function createApiActor(actor: ActorOutput): ApiActor {
660
+ function createApiActor(
661
+ actor: ActorOutput,
662
+ runnerName: string = "default",
663
+ ): ApiActor {
659
664
  return {
660
665
  actor_id: actor.actorId,
661
666
  name: actor.name,
662
667
  key: serializeActorKey(actor.key),
663
668
  namespace_id: "default", // Assert default namespace
664
- runner_name_selector: "rivetkit", // Assert rivetkit runner
669
+ runner_name_selector: runnerName,
665
670
  create_ts: Date.now(),
666
671
  connectable_ts: null,
667
672
  destroy_ts: null,
@@ -92,6 +92,7 @@ export class Registry<A extends RegistryActors> {
92
92
  if (config.runnerKind === "serverless") {
93
93
  config.defaultServerPort = 8080;
94
94
  config.overrideServerAddress = config.endpoint;
95
+ config.disableActorDriver = true;
95
96
  }
96
97
 
97
98
  // Configure logger
@@ -230,8 +231,33 @@ async function configureServerlessRunner(config: RunnerConfig): Promise<void> {
230
231
  ? config.autoConfigureServerless
231
232
  : {};
232
233
 
234
+ // Make the request to fetch all datacenters
235
+ const dcsUrl = `${config.endpoint}/datacenters`;
236
+
237
+ logger().debug({
238
+ msg: "fetching datacenters",
239
+ url: dcsUrl,
240
+ });
241
+
242
+ const dcsResponse = await fetch(dcsUrl, {
243
+ headers: {
244
+ ...(config.token ? { Authorization: `Bearer ${config.token}` } : {}),
245
+ },
246
+ });
247
+
248
+ if (!dcsResponse.ok) {
249
+ const errorText = await dcsResponse.text();
250
+ throw new Error(
251
+ `failed to configure serverless runner: ${dcsResponse.status} ${dcsResponse.statusText} - ${errorText}`,
252
+ );
253
+ }
254
+
255
+ const dcsRes = (await dcsResponse.json()) as {
256
+ datacenters: { name: string }[];
257
+ };
258
+
233
259
  // Build the request body
234
- const requestBody = {
260
+ const serverlessConfig = {
235
261
  serverless: {
236
262
  url:
237
263
  customConfig.url ||
@@ -245,6 +271,9 @@ async function configureServerlessRunner(config: RunnerConfig): Promise<void> {
245
271
  customConfig.slotsPerRunner ?? config.totalSlots ?? 1000,
246
272
  },
247
273
  };
274
+ const requestBody = Object.fromEntries(
275
+ dcsRes.datacenters.map((dc) => [dc.name, serverlessConfig]),
276
+ );
248
277
 
249
278
  // Make the request to configure the serverless runner
250
279
  const configUrl = `${config.endpoint}/runner-configs/${config.runnerName}?namespace=${config.namespace}`;
@@ -252,7 +281,7 @@ async function configureServerlessRunner(config: RunnerConfig): Promise<void> {
252
281
  logger().debug({
253
282
  msg: "configuring serverless runner",
254
283
  url: configUrl,
255
- config: requestBody.serverless,
284
+ config: serverlessConfig.serverless,
256
285
  });
257
286
 
258
287
  const response = await fetch(configUrl, {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/common/utils.ts","../../package.json","../../src/utils.ts"],"sourcesContent":["import type { Next } from \"hono\";\nimport type { ContentfulStatusCode } from \"hono/utils/http-status\";\nimport * as errors from \"@/actor/errors\";\nimport { getEnvUniversal } from \"@/utils\";\nimport type { Logger } from \"./log\";\n\nexport function assertUnreachable(x: never): never {\n\tthrow new Error(`Unreachable case: ${x}`);\n}\n\n/**\n * Safely stringifies an object, ensuring that the stringified object is under a certain size.\n * @param obj any object to stringify\n * @param maxSize maximum size of the stringified object in bytes\n * @returns stringified object\n */\nexport function safeStringify(obj: unknown, maxSize: number) {\n\tlet size = 0;\n\n\tfunction replacer(key: string, value: unknown) {\n\t\tif (value === null || value === undefined) return value;\n\t\tconst valueSize =\n\t\t\ttypeof value === \"string\" ? value.length : JSON.stringify(value).length;\n\t\tsize += key.length + valueSize;\n\n\t\tif (size > maxSize) {\n\t\t\tthrow new Error(`JSON object exceeds size limit of ${maxSize} bytes.`);\n\t\t}\n\n\t\treturn value;\n\t}\n\n\treturn JSON.stringify(obj, replacer);\n}\n\n// TODO: Instead of doing this, use a temp var for state and attempt to write\n// it. Roll back state if fails to serialize.\n\n/**\n * Check if a value is CBOR serializable.\n * Optionally pass an onInvalid callback to receive the path to invalid values.\n *\n * For a complete list of supported CBOR tags, see:\n * https://github.com/kriszyp/cbor-x/blob/cc1cf9df8ba72288c7842af1dd374d73e34cdbc1/README.md#list-of-supported-tags-for-decoding\n */\nexport function isCborSerializable(\n\tvalue: unknown,\n\tonInvalid?: (path: string) => void,\n\tcurrentPath = \"\",\n): boolean {\n\t// Handle primitive types directly\n\tif (value === null || value === undefined) {\n\t\treturn true;\n\t}\n\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) {\n\t\t\tonInvalid?.(currentPath);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tif (typeof value === \"boolean\" || typeof value === \"string\") {\n\t\treturn true;\n\t}\n\n\t// Handle BigInt (CBOR tags 2 and 3)\n\tif (typeof value === \"bigint\") {\n\t\treturn true;\n\t}\n\n\t// Handle Date objects (CBOR tags 0 and 1)\n\tif (value instanceof Date) {\n\t\treturn true;\n\t}\n\n\t// Handle typed arrays (CBOR tags 64-82)\n\tif (\n\t\tvalue instanceof Uint8Array ||\n\t\tvalue instanceof Uint8ClampedArray ||\n\t\tvalue instanceof Uint16Array ||\n\t\tvalue instanceof Uint32Array ||\n\t\tvalue instanceof BigUint64Array ||\n\t\tvalue instanceof Int8Array ||\n\t\tvalue instanceof Int16Array ||\n\t\tvalue instanceof Int32Array ||\n\t\tvalue instanceof BigInt64Array ||\n\t\tvalue instanceof Float32Array ||\n\t\tvalue instanceof Float64Array\n\t) {\n\t\treturn true;\n\t}\n\n\t// Handle Map (CBOR tag 259)\n\tif (value instanceof Map) {\n\t\tfor (const [key, val] of value.entries()) {\n\t\t\tconst keyPath = currentPath\n\t\t\t\t? `${currentPath}.key(${String(key)})`\n\t\t\t\t: `key(${String(key)})`;\n\t\t\tconst valPath = currentPath\n\t\t\t\t? `${currentPath}.value(${String(key)})`\n\t\t\t\t: `value(${String(key)})`;\n\t\t\tif (\n\t\t\t\t!isCborSerializable(key, onInvalid, keyPath) ||\n\t\t\t\t!isCborSerializable(val, onInvalid, valPath)\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Handle Set (CBOR tag 258)\n\tif (value instanceof Set) {\n\t\tlet index = 0;\n\t\tfor (const item of value.values()) {\n\t\t\tconst itemPath = currentPath\n\t\t\t\t? `${currentPath}.set[${index}]`\n\t\t\t\t: `set[${index}]`;\n\t\t\tif (!isCborSerializable(item, onInvalid, itemPath)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Handle RegExp (CBOR tag 27)\n\tif (value instanceof RegExp) {\n\t\treturn true;\n\t}\n\n\t// Handle Error objects (CBOR tag 27)\n\tif (value instanceof Error) {\n\t\treturn true;\n\t}\n\n\t// Handle arrays\n\tif (Array.isArray(value)) {\n\t\tfor (let i = 0; i < value.length; i++) {\n\t\t\tconst itemPath = currentPath ? `${currentPath}[${i}]` : `[${i}]`;\n\t\t\tif (!isCborSerializable(value[i], onInvalid, itemPath)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Handle plain objects and records (CBOR tags 105, 51, 57344-57599)\n\tif (typeof value === \"object\") {\n\t\t// Allow plain objects and objects with prototypes (for records and named objects)\n\t\tconst proto = Object.getPrototypeOf(value);\n\t\tif (proto !== null && proto !== Object.prototype) {\n\t\t\t// Check if it's a known serializable object type\n\t\t\tconst protoConstructor = value.constructor;\n\t\t\tif (protoConstructor && typeof protoConstructor.name === \"string\") {\n\t\t\t\t// Allow objects with named constructors (records, named objects)\n\t\t\t\t// This includes user-defined classes and built-in objects\n\t\t\t\t// that CBOR can serialize with tag 27 or record tags\n\t\t\t}\n\t\t}\n\n\t\t// Check all properties recursively\n\t\tfor (const key in value) {\n\t\t\tconst propPath = currentPath ? `${currentPath}.${key}` : key;\n\t\t\tif (\n\t\t\t\t!isCborSerializable(\n\t\t\t\t\tvalue[key as keyof typeof value],\n\t\t\t\t\tonInvalid,\n\t\t\t\t\tpropPath,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t// Not serializable\n\tonInvalid?.(currentPath);\n\treturn false;\n}\n\nexport interface DeconstructedError {\n\t__type: \"ActorError\";\n\tstatusCode: ContentfulStatusCode;\n\tpublic: boolean;\n\tgroup: string;\n\tcode: string;\n\tmessage: string;\n\tmetadata?: unknown;\n}\n\n/** Deconstructs error in to components that are used to build responses. */\nexport function deconstructError(\n\terror: unknown,\n\tlogger: Logger,\n\textraLog: Record<string, unknown>,\n\texposeInternalError = false,\n): DeconstructedError {\n\t// Build response error information. Only return errors if flagged as public in order to prevent leaking internal behavior.\n\t//\n\t// We log the error here instead of after generating the code & message because we need to log the original error, not the masked internal error.\n\tlet statusCode: ContentfulStatusCode;\n\tlet public_: boolean;\n\tlet group: string;\n\tlet code: string;\n\tlet message: string;\n\tlet metadata: unknown;\n\tif (errors.ActorError.isActorError(error) && error.public) {\n\t\t// Check if error has statusCode (could be ActorError instance or DeconstructedError)\n\t\tstatusCode = (\n\t\t\t\"statusCode\" in error && error.statusCode ? error.statusCode : 400\n\t\t) as ContentfulStatusCode;\n\t\tpublic_ = true;\n\t\tgroup = error.group;\n\t\tcode = error.code;\n\t\tmessage = getErrorMessage(error);\n\t\tmetadata = error.metadata;\n\n\t\tlogger.info({\n\t\t\tmsg: \"public error\",\n\t\t\tgroup,\n\t\t\tcode,\n\t\t\tmessage,\n\t\t\tissues: \"https://github.com/rivet-dev/rivetkit/issues\",\n\t\t\tsupport: \"https://rivet.dev/discord\",\n\t\t\t...extraLog,\n\t\t});\n\t} else if (exposeInternalError) {\n\t\tif (errors.ActorError.isActorError(error)) {\n\t\t\tstatusCode = 500;\n\t\t\tpublic_ = false;\n\t\t\tgroup = error.group;\n\t\t\tcode = error.code;\n\t\t\tmessage = getErrorMessage(error);\n\t\t\tmetadata = error.metadata;\n\n\t\t\tlogger.info({\n\t\t\t\tmsg: \"internal error\",\n\t\t\t\tgroup,\n\t\t\t\tcode,\n\t\t\t\tmessage,\n\t\t\t\tissues: \"https://github.com/rivet-dev/rivetkit/issues\",\n\t\t\t\tsupport: \"https://rivet.dev/discord\",\n\t\t\t\t...extraLog,\n\t\t\t});\n\t\t} else {\n\t\t\tstatusCode = 500;\n\t\t\tpublic_ = false;\n\t\t\tgroup = \"internal\";\n\t\t\tcode = errors.INTERNAL_ERROR_CODE;\n\t\t\tmessage = getErrorMessage(error);\n\n\t\t\tlogger.info({\n\t\t\t\tmsg: \"internal error\",\n\t\t\t\tgroup,\n\t\t\t\tcode,\n\t\t\t\tmessage,\n\t\t\t\tissues: \"https://github.com/rivet-dev/rivetkit/issues\",\n\t\t\t\tsupport: \"https://rivet.dev/discord\",\n\t\t\t\t...extraLog,\n\t\t\t});\n\t\t}\n\t} else {\n\t\tstatusCode = 500;\n\t\tpublic_ = false;\n\t\tgroup = \"internal\";\n\t\tcode = errors.INTERNAL_ERROR_CODE;\n\t\tmessage = errors.INTERNAL_ERROR_DESCRIPTION;\n\t\tmetadata = {\n\t\t\t//url: `https://hub.rivet.dev/projects/${actorMetadata.project.slug}/environments/${actorMetadata.environment.slug}/actors?actorId=${actorMetadata.actor.id}`,\n\t\t} satisfies errors.InternalErrorMetadata;\n\n\t\tlogger.warn({\n\t\t\tmsg: \"internal error\",\n\t\t\terror: getErrorMessage(error),\n\t\t\tstack: (error as Error)?.stack,\n\t\t\tissues: \"https://github.com/rivet-dev/rivetkit/issues\",\n\t\t\tsupport: \"https://rivet.dev/discord\",\n\t\t\t...extraLog,\n\t\t});\n\t}\n\n\treturn {\n\t\t__type: \"ActorError\",\n\t\tstatusCode,\n\t\tpublic: public_,\n\t\tgroup,\n\t\tcode,\n\t\tmessage,\n\t\tmetadata,\n\t};\n}\n\nexport function stringifyError(error: unknown): string {\n\tif (error instanceof Error) {\n\t\tif (\n\t\t\ttypeof process !== \"undefined\" &&\n\t\t\tgetEnvUniversal(\"_RIVETKIT_ERROR_STACK\") === \"1\"\n\t\t) {\n\t\t\treturn `${error.name}: ${error.message}${error.stack ? `\\n${error.stack}` : \"\"}`;\n\t\t} else {\n\t\t\treturn `${error.name}: ${error.message}`;\n\t\t}\n\t} else if (typeof error === \"string\") {\n\t\treturn error;\n\t} else if (typeof error === \"object\" && error !== null) {\n\t\ttry {\n\t\t\treturn `${JSON.stringify(error)}`;\n\t\t} catch {\n\t\t\treturn \"[cannot stringify error]\";\n\t\t}\n\t} else {\n\t\treturn `Unknown error: ${getErrorMessage(error)}`;\n\t}\n}\n\nfunction getErrorMessage(err: unknown): string {\n\tif (\n\t\terr &&\n\t\ttypeof err === \"object\" &&\n\t\t\"message\" in err &&\n\t\ttypeof err.message === \"string\"\n\t) {\n\t\treturn err.message;\n\t} else {\n\t\treturn String(err);\n\t}\n}\n\n/** Generates a `Next` handler to pass to middleware in order to be able to call arbitrary middleware. */\nexport function noopNext(): Next {\n\treturn async () => {};\n}\n","{\n \"name\": \"rivetkit\",\n \"version\": \"2.0.10\",\n \"description\": \"Lightweight libraries for building stateful actors on edge platforms\",\n \"license\": \"Apache-2.0\",\n \"keywords\": [\n \"rivetkit\",\n \"stateful\",\n \"serverless\",\n \"actors\",\n \"agents\",\n \"realtime\",\n \"websocket\",\n \"actors\",\n \"framework\"\n ],\n \"files\": [\n \"dist\",\n \"src\",\n \"deno.json\",\n \"bun.json\",\n \"package.json\"\n ],\n \"type\": \"module\",\n \"exports\": {\n \".\": {\n \"import\": {\n \"types\": \"./dist/tsup/mod.d.ts\",\n \"default\": \"./dist/tsup/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/mod.d.cts\",\n \"default\": \"./dist/tsup/mod.cjs\"\n }\n },\n \"./client\": {\n \"import\": {\n \"types\": \"./dist/tsup/client/mod.d.ts\",\n \"default\": \"./dist/tsup/client/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/client/mod.d.cts\",\n \"default\": \"./dist/tsup/client/mod.cjs\"\n }\n },\n \"./log\": {\n \"import\": {\n \"types\": \"./dist/tsup/common/log.d.ts\",\n \"default\": \"./dist/tsup/common/log.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/common/log.d.cts\",\n \"default\": \"./dist/tsup/common/log.cjs\"\n }\n },\n \"./errors\": {\n \"import\": {\n \"types\": \"./dist/tsup/actor/errors.d.ts\",\n \"default\": \"./dist/tsup/actor/errors.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/actor/errors.d.cts\",\n \"default\": \"./dist/tsup/actor/errors.cjs\"\n }\n },\n \"./utils\": {\n \"import\": {\n \"types\": \"./dist/tsup/utils.d.ts\",\n \"default\": \"./dist/tsup/utils.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/utils.d.cts\",\n \"default\": \"./dist/tsup/utils.cjs\"\n }\n },\n \"./driver-helpers\": {\n \"import\": {\n \"types\": \"./dist/tsup/driver-helpers/mod.d.ts\",\n \"default\": \"./dist/tsup/driver-helpers/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/driver-helpers/mod.d.cts\",\n \"default\": \"./dist/tsup/driver-helpers/mod.cjs\"\n }\n },\n \"./driver-helpers/websocket\": {\n \"import\": {\n \"types\": \"./dist/tsup/common/websocket.d.ts\",\n \"default\": \"./dist/tsup/common/websocket.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/common/websocket.d.cts\",\n \"default\": \"./dist/tsup/common/websocket.cjs\"\n }\n },\n \"./driver-test-suite\": {\n \"import\": {\n \"types\": \"./dist/tsup/driver-test-suite/mod.d.ts\",\n \"default\": \"./dist/tsup/driver-test-suite/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/driver-test-suite/mod.d.cts\",\n \"default\": \"./dist/tsup/driver-test-suite/mod.cjs\"\n }\n },\n \"./topologies/coordinate\": {\n \"import\": {\n \"types\": \"./dist/tsup/topologies/coordinate/mod.d.ts\",\n \"default\": \"./dist/tsup/topologies/coordinate/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/topologies/coordinate/mod.d.cts\",\n \"default\": \"./dist/tsup/topologies/coordinate/mod.cjs\"\n }\n },\n \"./topologies/partition\": {\n \"import\": {\n \"types\": \"./dist/tsup/topologies/partition/mod.d.ts\",\n \"default\": \"./dist/tsup/topologies/partition/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/topologies/partition/mod.d.cts\",\n \"default\": \"./dist/tsup/topologies/partition/mod.cjs\"\n }\n },\n \"./test\": {\n \"import\": {\n \"types\": \"./dist/tsup/test/mod.d.ts\",\n \"default\": \"./dist/tsup/test/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/test/mod.d.cts\",\n \"default\": \"./dist/tsup/test/mod.cjs\"\n }\n },\n \"./inspector\": {\n \"import\": {\n \"types\": \"./dist/tsup/inspector/mod.d.ts\",\n \"default\": \"./dist/tsup/inspector/mod.js\"\n },\n \"require\": {\n \"types\": \"./dist/tsup/inspector/mod.d.cts\",\n \"default\": \"./dist/tsup/inspector/mod.cjs\"\n }\n }\n },\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"sideEffects\": [\n \"./dist/tsup/chunk-*.js\",\n \"./dist/tsup/chunk-*.cjs\"\n ],\n \"scripts\": {\n \"build\": \"tsup src/mod.ts src/client/mod.ts src/common/log.ts src/common/websocket.ts src/actor/errors.ts src/topologies/coordinate/mod.ts src/topologies/partition/mod.ts src/utils.ts src/driver-helpers/mod.ts src/driver-test-suite/mod.ts src/test/mod.ts src/inspector/mod.ts\",\n \"build:schema\": \"./scripts/compile-bare.ts compile schemas/client-protocol/v1.bare -o dist/schemas/client-protocol/v1.ts && ./scripts/compile-bare.ts compile schemas/file-system-driver/v1.bare -o dist/schemas/file-system-driver/v1.ts && ./scripts/compile-bare.ts compile schemas/actor-persist/v1.bare -o dist/schemas/actor-persist/v1.ts\",\n \"check-types\": \"tsc --noEmit\",\n \"test\": \"vitest run\",\n \"test:watch\": \"vitest\",\n \"dump-openapi\": \"tsx scripts/dump-openapi.ts\"\n },\n \"dependencies\": {\n \"@bare-ts/lib\": \"~0.3.0\",\n \"@hono/standard-validator\": \"^0.1.3\",\n \"@hono/zod-openapi\": \"^0.19.10\",\n \"@rivetkit/engine-runner\": \"https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@76c2e031\",\n \"@rivetkit/fast-json-patch\": \"^3.1.2\",\n \"cbor-x\": \"^1.6.0\",\n \"hono\": \"^4.7.0\",\n \"invariant\": \"^2.2.4\",\n \"nanoevents\": \"^9.1.0\",\n \"on-change\": \"^5.0.1\",\n \"p-retry\": \"^6.2.1\",\n \"pino\": \"^9.5.0\",\n \"zod\": \"^3.25.76\"\n },\n \"devDependencies\": {\n \"@bare-ts/tools\": \"^0.13.0\",\n \"@hono/node-server\": \"^1.18.2\",\n \"@hono/node-ws\": \"^1.1.1\",\n \"@types/invariant\": \"^2\",\n \"@types/node\": \"^22.13.1\",\n \"@types/ws\": \"^8\",\n \"@vitest/ui\": \"3.1.1\",\n \"bundle-require\": \"^5.1.0\",\n \"eventsource\": \"^4.0.0\",\n \"tsup\": \"^8.4.0\",\n \"tsx\": \"^4.19.4\",\n \"typescript\": \"^5.7.3\",\n \"vitest\": \"^3.1.1\",\n \"ws\": \"^8.18.1\"\n },\n \"peerDependencies\": {\n \"@hono/node-server\": \"^1.14.0\",\n \"@hono/node-ws\": \"^1.1.1\",\n \"eventsource\": \"^4.0.0\",\n \"ws\": \"^8.0.0\"\n },\n \"peerDependenciesMeta\": {\n \"@hono/node-server\": {\n \"optional\": true\n },\n \"@hono/node-ws\": {\n \"optional\": true\n },\n \"eventsource\": {\n \"optional\": true\n },\n \"ws\": {\n \"optional\": true\n }\n },\n \"stableVersion\": \"0.8.0\"\n}\n","export { stringifyError } from \"@/common/utils\";\nexport { assertUnreachable } from \"./common/utils\";\n\nimport type { Context as HonoContext, Handler as HonoHandler } from \"hono\";\n\nimport pkgJson from \"../package.json\" with { type: \"json\" };\n\nexport const VERSION = pkgJson.version;\n\nlet _userAgent: string | undefined;\n\nexport function httpUserAgent(): string {\n\t// Return cached value if already initialized\n\tif (_userAgent !== undefined) {\n\t\treturn _userAgent;\n\t}\n\n\t// Library\n\tlet userAgent = `RivetKit/${VERSION}`;\n\n\t// Navigator\n\tconst navigatorObj = typeof navigator !== \"undefined\" ? navigator : undefined;\n\tif (navigatorObj?.userAgent) userAgent += ` ${navigatorObj.userAgent}`;\n\n\t_userAgent = userAgent;\n\n\treturn userAgent;\n}\n\nexport type UpgradeWebSocket = (\n\tcreateEvents: (c: HonoContext) => any,\n) => HonoHandler;\n\nexport type GetUpgradeWebSocket = () => UpgradeWebSocket;\n\nexport function getEnvUniversal(key: string): string | undefined {\n\tif (typeof Deno !== \"undefined\") {\n\t\treturn Deno.env.get(key);\n\t} else if (typeof process !== \"undefined\") {\n\t\t// Do this after Deno since `process` is sometimes polyfilled\n\t\treturn process.env[key];\n\t}\n}\n\nexport function dbg<T>(x: T): T {\n\tconsole.trace(`=== DEBUG ===\\n${x}`);\n\treturn x;\n}\n\n/**\n * Converts various ArrayBuffer-like types to Uint8Array.\n * Handles ArrayBuffer, ArrayBufferView (including typed arrays), and passes through existing Uint8Array.\n *\n * @param data - The ArrayBuffer or ArrayBufferView to convert\n * @returns A Uint8Array view of the data\n */\nexport function toUint8Array(data: ArrayBuffer | ArrayBufferView): Uint8Array {\n\tif (data instanceof Uint8Array) {\n\t\treturn data;\n\t} else if (data instanceof ArrayBuffer) {\n\t\treturn new Uint8Array(data);\n\t} else if (ArrayBuffer.isView(data)) {\n\t\t// Handle other ArrayBufferView types (Int8Array, Uint16Array, DataView, etc.)\n\t\treturn new Uint8Array(\n\t\t\tdata.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength),\n\t\t);\n\t} else {\n\t\tthrow new TypeError(\"Input must be ArrayBuffer or ArrayBufferView\");\n\t}\n}\n\n// Long timeouts\n//\n// JavaScript timers use a signed 32-bit integer for delays, so values above 2^31-1 (~24.8 days)\n// are not reliable and may fire immediately or overflow.\n//\n// https://developer.mozilla.org/en-US/docs/Web/API/Window/setTimeout#maximum_delay_value\nconst TIMEOUT_MAX = 2147483647; // 2^31-1\n\nexport type LongTimeoutHandle = { abort: () => void };\n\n/**\n * Polyfill for Promise.withResolvers().\n *\n * This is specifically for Cloudflare Workers. Their implementation of Promise.withResolvers does not work correctly.\n */\nexport function promiseWithResolvers<T>(): {\n\tpromise: Promise<T>;\n\tresolve: (value: T | PromiseLike<T>) => void;\n\treject: (reason?: any) => void;\n} {\n\tlet resolve!: (value: T | PromiseLike<T>) => void;\n\tlet reject!: (reason?: any) => void;\n\tconst promise = new Promise<T>((res, rej) => {\n\t\tresolve = res;\n\t\treject = rej;\n\t});\n\treturn { promise, resolve, reject };\n}\n\nexport function setLongTimeout(\n\tlistener: () => void,\n\tafter: number,\n): LongTimeoutHandle {\n\tlet timeout: ReturnType<typeof setTimeout> | undefined;\n\n\tfunction start(remaining: number) {\n\t\tif (remaining <= TIMEOUT_MAX) {\n\t\t\ttimeout = setTimeout(listener, remaining);\n\t\t} else {\n\t\t\ttimeout = setTimeout(() => {\n\t\t\t\tstart(remaining - TIMEOUT_MAX);\n\t\t\t}, TIMEOUT_MAX);\n\t\t}\n\t}\n\n\tstart(after);\n\n\treturn {\n\t\tabort: () => {\n\t\t\tif (timeout !== undefined) clearTimeout(timeout);\n\t\t},\n\t};\n}\n\n/**\n * A tiny utility that coalesces/enqueues async operations so only the latest\n * queued task runs per cycle, while callers receive a promise that resolves\n * when the task for the cycle they joined has completed.\n */\nexport class SinglePromiseQueue {\n\t/** Next operation to execute in the queue. If attempting to enqueue another op, it will override the existing op. */\n\t#queuedOp?: () => Promise<void>;\n\n\t/** The currently running promise of #drainLoop. Do not await this, instead await `pending` to await the current cycle. */\n\trunningDrainLoop?: Promise<void>;\n\n\t/** Pending resolver fro the currently queued entry. */\n\t#pending?: ReturnType<typeof promiseWithResolvers<void>>;\n\n\t/** Queue the next operation and return a promise that resolves when it flushes. */\n\tenqueue(op: () => Promise<void>): Promise<void> {\n\t\t// Replace any previously queued operation with the latest one\n\t\tthis.#queuedOp = op;\n\n\t\t// Ensure a shared resolver exists for all callers in this cycle\n\t\tif (!this.#pending) {\n\t\t\tthis.#pending = promiseWithResolvers<void>();\n\t\t}\n\n\t\tconst waitForThisCycle = this.#pending.promise;\n\n\t\t// Start runner if not already running\n\t\tif (!this.runningDrainLoop) {\n\t\t\tthis.runningDrainLoop = this.#drainLoop();\n\t\t}\n\n\t\treturn waitForThisCycle;\n\t}\n\n\t/** Drain queued operations sequentially until there is nothing left. */\n\tasync #drainLoop(): Promise<void> {\n\t\ttry {\n\t\t\twhile (this.#queuedOp) {\n\t\t\t\t// Capture current cycle resolver then reset for the next cycle\n\t\t\t\tconst resolver = this.#pending;\n\t\t\t\tthis.#pending = undefined;\n\n\t\t\t\t// Capture and clear the currently queued operation\n\t\t\t\tconst op = this.#queuedOp;\n\t\t\t\tthis.#queuedOp = undefined;\n\n\t\t\t\ttry {\n\t\t\t\t\tawait op();\n\t\t\t\t} catch {\n\t\t\t\t\t// Swallow errors: callers only await cycle completion, not success\n\t\t\t\t}\n\n\t\t\t\t// Notify all waiters for this cycle\n\t\t\t\tresolver?.resolve();\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.runningDrainLoop = undefined;\n\t\t}\n\t}\n}\n\nexport function bufferToArrayBuffer(buf: Buffer | Uint8Array): ArrayBuffer {\n\treturn buf.buffer.slice(\n\t\tbuf.byteOffset,\n\t\tbuf.byteOffset + buf.byteLength,\n\t) as ArrayBuffer;\n}\n\n/**\n * Properly combines a base URL endpoint with a path, preserving any base path in the endpoint.\n *\n * @example\n * combineUrlPath(\"http://localhost:8787/rivet\", \"/actors/action\")\n * // Returns: \"http://localhost:8787/rivet/actors/action\"\n *\n * @example\n * combineUrlPath(\"http://localhost:8787/rivet\", \"/actors?type=foo\", { namespace: \"test\" })\n * // Returns: \"http://localhost:8787/rivet/actors?type=foo&namespace=test\"\n *\n * @param endpoint The base URL endpoint that may contain a path component\n * @param path The path to append to the endpoint (may include query parameters)\n * @param queryParams Optional additional query parameters to append\n * @returns The properly combined URL string\n */\nexport function combineUrlPath(\n\tendpoint: string,\n\tpath: string,\n\tqueryParams?: Record<string, string | undefined>,\n): string {\n\tconst baseUrl = new URL(endpoint);\n\n\t// Extract path and query from the provided path\n\tconst pathParts = path.split(\"?\");\n\tconst pathOnly = pathParts[0];\n\tconst existingQuery = pathParts[1] || \"\";\n\n\t// Remove trailing slash from base path and ensure path starts with /\n\tconst basePath = baseUrl.pathname.replace(/\\/$/, \"\");\n\tconst cleanPath = pathOnly.startsWith(\"/\") ? pathOnly : `/${pathOnly}`;\n\t// Combine paths and remove any double slashes\n\tconst fullPath = (basePath + cleanPath).replace(/\\/\\//g, \"/\");\n\n\t// Build query string\n\tconst queryParts: string[] = [];\n\tif (existingQuery) {\n\t\tqueryParts.push(existingQuery);\n\t}\n\tif (queryParams) {\n\t\tfor (const [key, value] of Object.entries(queryParams)) {\n\t\t\tif (value !== undefined) {\n\t\t\t\tqueryParts.push(\n\t\t\t\t\t`${encodeURIComponent(key)}=${encodeURIComponent(value)}`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tconst fullQuery = queryParts.length > 0 ? `?${queryParts.join(\"&\")}` : \"\";\n\treturn `${baseUrl.protocol}//${baseUrl.host}${fullPath}${fullQuery}`;\n}\n"],"mappings":";;;;;;;AAMO,SAAS,kBAAkB,GAAiB;AAClD,QAAM,IAAI,MAAM,qBAAqB,CAAC,EAAE;AACzC;AAqCO,SAAS,mBACf,OACA,WACA,cAAc,IACJ;AAEV,MAAI,UAAU,QAAQ,UAAU,QAAW;AAC1C,WAAO;AAAA,EACR;AAEA,MAAI,OAAO,UAAU,UAAU;AAC9B,QAAI,CAAC,OAAO,SAAS,KAAK,GAAG;AAC5B,6CAAY;AACZ,aAAO;AAAA,IACR;AACA,WAAO;AAAA,EACR;AAEA,MAAI,OAAO,UAAU,aAAa,OAAO,UAAU,UAAU;AAC5D,WAAO;AAAA,EACR;AAGA,MAAI,OAAO,UAAU,UAAU;AAC9B,WAAO;AAAA,EACR;AAGA,MAAI,iBAAiB,MAAM;AAC1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