rivetkit 2.0.20 → 2.0.22-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/dist/tsup/actor/errors.cjs.map +1 -1
  2. package/dist/tsup/{chunk-L3YPHXPE.js → chunk-4B25D5OW.js} +481 -100
  3. package/dist/tsup/chunk-4B25D5OW.js.map +1 -0
  4. package/dist/tsup/{chunk-G6JGHCG4.cjs → chunk-5EB77IQ2.cjs} +6 -6
  5. package/dist/tsup/chunk-5EB77IQ2.cjs.map +1 -0
  6. package/dist/tsup/{chunk-KUZWEM23.cjs → chunk-6Z3YA6QR.cjs} +8 -4
  7. package/dist/tsup/chunk-6Z3YA6QR.cjs.map +1 -0
  8. package/dist/tsup/{chunk-ZODINJWN.cjs → chunk-7FEMVD3D.cjs} +12 -12
  9. package/dist/tsup/chunk-7FEMVD3D.cjs.map +1 -0
  10. package/dist/tsup/{chunk-FYP3TZXD.cjs → chunk-BIOPK7IB.cjs} +32 -26
  11. package/dist/tsup/chunk-BIOPK7IB.cjs.map +1 -0
  12. package/dist/tsup/{chunk-KKRR7DSG.cjs → chunk-C2U6KGOG.cjs} +3 -3
  13. package/dist/tsup/chunk-C2U6KGOG.cjs.map +1 -0
  14. package/dist/tsup/{chunk-5F6X4AFU.js → chunk-EEXX243L.js} +6 -6
  15. package/dist/tsup/chunk-EEXX243L.js.map +1 -0
  16. package/dist/tsup/{chunk-GQ5WTE64.js → chunk-FETQGZN4.js} +263 -97
  17. package/dist/tsup/chunk-FETQGZN4.js.map +1 -0
  18. package/dist/tsup/{chunk-ER5OT3SQ.js → chunk-GJPOIJHZ.js} +2 -2
  19. package/dist/tsup/chunk-GJPOIJHZ.js.map +1 -0
  20. package/dist/tsup/{chunk-7ACKZS3T.js → chunk-I7EJWHYV.js} +13 -7
  21. package/dist/tsup/chunk-I7EJWHYV.js.map +1 -0
  22. package/dist/tsup/{chunk-QMVCFQ37.js → chunk-JKNDUKFI.js} +8 -4
  23. package/dist/tsup/chunk-JKNDUKFI.js.map +1 -0
  24. package/dist/tsup/{chunk-M6LIJ6BK.js → chunk-JN6GPVFY.js} +3 -3
  25. package/dist/tsup/chunk-KSRXX3Z4.cjs.map +1 -1
  26. package/dist/tsup/{chunk-DUOTOMP7.cjs → chunk-LCQDY73V.cjs} +3 -3
  27. package/dist/tsup/chunk-LCQDY73V.cjs.map +1 -0
  28. package/dist/tsup/{chunk-RI4YHZZW.js → chunk-NDLOG2JH.js} +2 -2
  29. package/dist/tsup/{chunk-RI4YHZZW.js.map → chunk-NDLOG2JH.js.map} +1 -1
  30. package/dist/tsup/{chunk-2S7HJMMY.cjs → chunk-OAB7ECAB.cjs} +630 -249
  31. package/dist/tsup/chunk-OAB7ECAB.cjs.map +1 -0
  32. package/dist/tsup/{chunk-PV22ZBDE.cjs → chunk-PELXJCJS.cjs} +16 -10
  33. package/dist/tsup/chunk-PELXJCJS.cjs.map +1 -0
  34. package/dist/tsup/{chunk-JZD6FEOE.cjs → chunk-R6XOZKMU.cjs} +455 -289
  35. package/dist/tsup/chunk-R6XOZKMU.cjs.map +1 -0
  36. package/dist/tsup/{chunk-QRUGCDA5.js → chunk-RPI45FGS.js} +2 -2
  37. package/dist/tsup/{chunk-MGHPBNWB.js → chunk-UBCUW7HD.js} +2 -2
  38. package/dist/tsup/{chunk-RJVSNJO7.cjs → chunk-VJLGVVGP.cjs} +7 -7
  39. package/dist/tsup/chunk-VJLGVVGP.cjs.map +1 -0
  40. package/dist/tsup/{chunk-YFFCPYHY.js → chunk-ZVEDMBFT.js} +11 -5
  41. package/dist/tsup/chunk-ZVEDMBFT.js.map +1 -0
  42. package/dist/tsup/{chunk-2I6L3VRO.cjs → chunk-ZZYMCYAY.cjs} +14 -14
  43. package/dist/tsup/chunk-ZZYMCYAY.cjs.map +1 -0
  44. package/dist/tsup/client/mod.cjs +9 -9
  45. package/dist/tsup/client/mod.cjs.map +1 -1
  46. package/dist/tsup/client/mod.d.cts +2 -2
  47. package/dist/tsup/client/mod.d.ts +2 -2
  48. package/dist/tsup/client/mod.js +8 -8
  49. package/dist/tsup/common/log.cjs +3 -3
  50. package/dist/tsup/common/log.cjs.map +1 -1
  51. package/dist/tsup/common/log.js +2 -2
  52. package/dist/tsup/common/websocket.cjs +4 -4
  53. package/dist/tsup/common/websocket.cjs.map +1 -1
  54. package/dist/tsup/common/websocket.js +3 -3
  55. package/dist/tsup/{conn-CmPcqOCF.d.ts → conn-Clu655RU.d.ts} +72 -71
  56. package/dist/tsup/{conn-DU5EbfCu.d.cts → conn-lUvFLo_q.d.cts} +72 -71
  57. package/dist/tsup/driver-helpers/mod.cjs +5 -5
  58. package/dist/tsup/driver-helpers/mod.cjs.map +1 -1
  59. package/dist/tsup/driver-helpers/mod.d.cts +1 -1
  60. package/dist/tsup/driver-helpers/mod.d.ts +1 -1
  61. package/dist/tsup/driver-helpers/mod.js +4 -4
  62. package/dist/tsup/driver-test-suite/mod.cjs +603 -294
  63. package/dist/tsup/driver-test-suite/mod.cjs.map +1 -1
  64. package/dist/tsup/driver-test-suite/mod.d.cts +1 -1
  65. package/dist/tsup/driver-test-suite/mod.d.ts +1 -1
  66. package/dist/tsup/driver-test-suite/mod.js +574 -265
  67. package/dist/tsup/driver-test-suite/mod.js.map +1 -1
  68. package/dist/tsup/inspector/mod.cjs +6 -6
  69. package/dist/tsup/inspector/mod.cjs.map +1 -1
  70. package/dist/tsup/inspector/mod.d.cts +68 -7
  71. package/dist/tsup/inspector/mod.d.ts +68 -7
  72. package/dist/tsup/inspector/mod.js +5 -5
  73. package/dist/tsup/mod.cjs +10 -10
  74. package/dist/tsup/mod.cjs.map +1 -1
  75. package/dist/tsup/mod.d.cts +2 -2
  76. package/dist/tsup/mod.d.ts +2 -2
  77. package/dist/tsup/mod.js +9 -9
  78. package/dist/tsup/test/mod.cjs +11 -11
  79. package/dist/tsup/test/mod.cjs.map +1 -1
  80. package/dist/tsup/test/mod.d.cts +1 -1
  81. package/dist/tsup/test/mod.d.ts +1 -1
  82. package/dist/tsup/test/mod.js +10 -10
  83. package/dist/tsup/utils.cjs +2 -2
  84. package/dist/tsup/utils.cjs.map +1 -1
  85. package/dist/tsup/utils.js +1 -1
  86. package/package.json +4 -3
  87. package/src/actor/config.ts +108 -15
  88. package/src/actor/conn-drivers.ts +2 -1
  89. package/src/actor/instance.ts +119 -35
  90. package/src/actor/keys.test.ts +13 -4
  91. package/src/actor/protocol/old.ts +10 -3
  92. package/src/actor/router-endpoints.ts +26 -16
  93. package/src/actor/router.ts +41 -13
  94. package/src/actor/unstable-react.ts +1 -1
  95. package/src/client/actor-common.ts +3 -1
  96. package/src/client/actor-conn.ts +44 -12
  97. package/src/client/actor-handle.ts +4 -1
  98. package/src/client/client.ts +32 -18
  99. package/src/client/utils.ts +21 -8
  100. package/src/common/actor-router-consts.ts +2 -0
  101. package/src/common/inline-websocket-adapter2.ts +24 -6
  102. package/src/common/log.ts +6 -2
  103. package/src/common/logfmt.ts +3 -1
  104. package/src/common/router.ts +3 -1
  105. package/src/common/utils.ts +6 -2
  106. package/src/driver-helpers/utils.ts +4 -1
  107. package/src/driver-test-suite/mod.ts +15 -4
  108. package/src/driver-test-suite/test-inline-client-driver.ts +35 -13
  109. package/src/driver-test-suite/tests/action-features.ts +6 -2
  110. package/src/driver-test-suite/tests/actor-conn-state.ts +18 -8
  111. package/src/driver-test-suite/tests/actor-conn.ts +35 -13
  112. package/src/driver-test-suite/tests/actor-handle.ts +35 -15
  113. package/src/driver-test-suite/tests/actor-inline-client.ts +34 -23
  114. package/src/driver-test-suite/tests/actor-inspector.ts +241 -131
  115. package/src/driver-test-suite/tests/actor-reconnect.ts +14 -4
  116. package/src/driver-test-suite/tests/actor-schedule.ts +12 -3
  117. package/src/driver-test-suite/tests/actor-sleep.ts +6 -3
  118. package/src/driver-test-suite/tests/actor-vars.ts +6 -2
  119. package/src/driver-test-suite/tests/manager-driver.ts +16 -6
  120. package/src/driver-test-suite/tests/raw-http-request-properties.ts +64 -25
  121. package/src/driver-test-suite/tests/raw-http.ts +17 -5
  122. package/src/driver-test-suite/tests/raw-websocket.ts +36 -12
  123. package/src/driver-test-suite/tests/request-access.ts +18 -8
  124. package/src/drivers/engine/actor-driver.ts +46 -25
  125. package/src/drivers/engine/config.ts +2 -1
  126. package/src/drivers/file-system/global-state.ts +58 -16
  127. package/src/drivers/file-system/manager.ts +35 -12
  128. package/src/drivers/file-system/mod.ts +6 -1
  129. package/src/drivers/file-system/utils.ts +8 -2
  130. package/src/engine-process/mod.ts +15 -4
  131. package/src/inspector/actor.ts +63 -23
  132. package/src/inspector/config.ts +2 -1
  133. package/src/inspector/manager.ts +10 -3
  134. package/src/inspector/utils.ts +2 -1
  135. package/src/manager/driver.ts +4 -1
  136. package/src/manager/gateway.ts +278 -8
  137. package/src/manager/hono-websocket-adapter.ts +33 -10
  138. package/src/manager/router-schema.ts +4 -2
  139. package/src/manager/router.ts +78 -12
  140. package/src/manager-api/actors.ts +2 -0
  141. package/src/registry/mod.ts +31 -9
  142. package/src/registry/run-config.ts +3 -1
  143. package/src/remote-manager-driver/api-endpoints.ts +2 -2
  144. package/src/remote-manager-driver/mod.ts +23 -7
  145. package/src/remote-manager-driver/ws-proxy.ts +21 -5
  146. package/src/serde.ts +6 -2
  147. package/src/test/mod.ts +2 -1
  148. package/src/utils.ts +6 -2
  149. package/dist/tsup/chunk-2I6L3VRO.cjs.map +0 -1
  150. package/dist/tsup/chunk-2S7HJMMY.cjs.map +0 -1
  151. package/dist/tsup/chunk-5F6X4AFU.js.map +0 -1
  152. package/dist/tsup/chunk-7ACKZS3T.js.map +0 -1
  153. package/dist/tsup/chunk-DUOTOMP7.cjs.map +0 -1
  154. package/dist/tsup/chunk-ER5OT3SQ.js.map +0 -1
  155. package/dist/tsup/chunk-FYP3TZXD.cjs.map +0 -1
  156. package/dist/tsup/chunk-G6JGHCG4.cjs.map +0 -1
  157. package/dist/tsup/chunk-GQ5WTE64.js.map +0 -1
  158. package/dist/tsup/chunk-JZD6FEOE.cjs.map +0 -1
  159. package/dist/tsup/chunk-KKRR7DSG.cjs.map +0 -1
  160. package/dist/tsup/chunk-KUZWEM23.cjs.map +0 -1
  161. package/dist/tsup/chunk-L3YPHXPE.js.map +0 -1
  162. package/dist/tsup/chunk-PV22ZBDE.cjs.map +0 -1
  163. package/dist/tsup/chunk-QMVCFQ37.js.map +0 -1
  164. package/dist/tsup/chunk-RJVSNJO7.cjs.map +0 -1
  165. package/dist/tsup/chunk-YFFCPYHY.js.map +0 -1
  166. package/dist/tsup/chunk-ZODINJWN.cjs.map +0 -1
  167. /package/dist/tsup/{chunk-M6LIJ6BK.js.map → chunk-JN6GPVFY.js.map} +0 -0
  168. /package/dist/tsup/{chunk-QRUGCDA5.js.map → chunk-RPI45FGS.js.map} +0 -0
  169. /package/dist/tsup/{chunk-MGHPBNWB.js.map → chunk-UBCUW7HD.js.map} +0 -0
@@ -1,30 +1,30 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunk2I6L3VROcjs = require('../chunk-2I6L3VRO.cjs');
3
+ var _chunkZZYMCYAYcjs = require('../chunk-ZZYMCYAY.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunk2S7HJMMYcjs = require('../chunk-2S7HJMMY.cjs');
7
+ var _chunkOAB7ECABcjs = require('../chunk-OAB7ECAB.cjs');
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkDUOTOMP7cjs = require('../chunk-DUOTOMP7.cjs');
12
+ var _chunkLCQDY73Vcjs = require('../chunk-LCQDY73V.cjs');
13
13
 
14
14
 
15
- var _chunkG6JGHCG4cjs = require('../chunk-G6JGHCG4.cjs');
15
+ var _chunk5EB77IQ2cjs = require('../chunk-5EB77IQ2.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkJZD6FEOEcjs = require('../chunk-JZD6FEOE.cjs');
20
- require('../chunk-ZODINJWN.cjs');
19
+ var _chunkR6XOZKMUcjs = require('../chunk-R6XOZKMU.cjs');
20
+ require('../chunk-7FEMVD3D.cjs');
21
21
 
22
22
 
23
- var _chunkKKRR7DSGcjs = require('../chunk-KKRR7DSG.cjs');
23
+ var _chunkC2U6KGOGcjs = require('../chunk-C2U6KGOG.cjs');
24
24
 
25
25
 
26
26
 
27
- var _chunkFYP3TZXDcjs = require('../chunk-FYP3TZXD.cjs');
27
+ var _chunkBIOPK7IBcjs = require('../chunk-BIOPK7IB.cjs');
28
28
 
29
29
 
30
30
 
@@ -35,13 +35,13 @@ var _chunkFYP3TZXDcjs = require('../chunk-FYP3TZXD.cjs');
35
35
 
36
36
 
37
37
 
38
- var _chunkPV22ZBDEcjs = require('../chunk-PV22ZBDE.cjs');
38
+ var _chunkPELXJCJScjs = require('../chunk-PELXJCJS.cjs');
39
39
 
40
40
 
41
- var _chunkRJVSNJO7cjs = require('../chunk-RJVSNJO7.cjs');
41
+ var _chunkVJLGVVGPcjs = require('../chunk-VJLGVVGP.cjs');
42
42
 
43
43
 
44
- var _chunkKUZWEM23cjs = require('../chunk-KUZWEM23.cjs');
44
+ var _chunk6Z3YA6QRcjs = require('../chunk-6Z3YA6QR.cjs');
45
45
 
46
46
 
47
47
 
@@ -56,7 +56,7 @@ var _vitest = require('vitest');
56
56
 
57
57
  // src/driver-test-suite/log.ts
58
58
  function logger() {
59
- return _chunkRJVSNJO7cjs.getLogger.call(void 0, "test-suite");
59
+ return _chunkVJLGVVGPcjs.getLogger.call(void 0, "test-suite");
60
60
  }
61
61
 
62
62
  // src/driver-test-suite/tests/action-features.ts
@@ -70,14 +70,22 @@ var _cborx = require('cbor-x'); var cbor = _interopRequireWildcard(_cborx);
70
70
  function createTestInlineClientDriver(endpoint, encoding, transport) {
71
71
  return {
72
72
  getForId(input) {
73
- return makeInlineRequest(endpoint, encoding, transport, "getForId", [
74
- input
75
- ]);
73
+ return makeInlineRequest(
74
+ endpoint,
75
+ encoding,
76
+ transport,
77
+ "getForId",
78
+ [input]
79
+ );
76
80
  },
77
81
  getWithKey(input) {
78
- return makeInlineRequest(endpoint, encoding, transport, "getWithKey", [
79
- input
80
- ]);
82
+ return makeInlineRequest(
83
+ endpoint,
84
+ encoding,
85
+ transport,
86
+ "getWithKey",
87
+ [input]
88
+ );
81
89
  },
82
90
  getOrCreateWithKey(input) {
83
91
  return makeInlineRequest(
@@ -89,9 +97,13 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
89
97
  );
90
98
  },
91
99
  createActor(input) {
92
- return makeInlineRequest(endpoint, encoding, transport, "createActor", [
93
- input
94
- ]);
100
+ return makeInlineRequest(
101
+ endpoint,
102
+ encoding,
103
+ transport,
104
+ "createActor",
105
+ [input]
106
+ );
95
107
  },
96
108
  async sendRequest(actorId, actorRequest) {
97
109
  var _a;
@@ -105,9 +117,13 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
105
117
  path: pathWithQuery
106
118
  });
107
119
  const url = `${endpoint}/.test/inline-driver/send-request/${pathWithQuery}`;
108
- logger().debug({ msg: "rewriting http url", from: oldUrl, to: url });
120
+ logger().debug({
121
+ msg: "rewriting http url",
122
+ from: oldUrl,
123
+ to: url
124
+ });
109
125
  const headers = new Headers(actorRequest.headers);
110
- headers.set(_chunkPV22ZBDEcjs.HEADER_ACTOR_ID, actorId);
126
+ headers.set(_chunkPELXJCJScjs.HEADER_ACTOR_ID, actorId);
111
127
  const response = await fetch(
112
128
  new Request(url, {
113
129
  method: actorRequest.method,
@@ -123,7 +139,7 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
123
139
  const errorData = await clonedResponse.json();
124
140
  if (errorData.error) {
125
141
  if (typeof errorData.error === "object") {
126
- throw new (0, _chunkJZD6FEOEcjs.ActorError)(
142
+ throw new (0, _chunkR6XOZKMUcjs.ActorError)(
127
143
  errorData.error.code,
128
144
  errorData.error.message,
129
145
  errorData.error.metadata
@@ -131,7 +147,7 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
131
147
  }
132
148
  }
133
149
  } catch (e) {
134
- if (!(e instanceof _chunkJZD6FEOEcjs.ActorError)) {
150
+ if (!(e instanceof _chunkR6XOZKMUcjs.ActorError)) {
135
151
  return response;
136
152
  }
137
153
  throw e;
@@ -140,7 +156,7 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
140
156
  return response;
141
157
  },
142
158
  async openWebSocket(path, actorId, encoding2, params, connId, connToken) {
143
- const WebSocket2 = await _chunkKKRR7DSGcjs.importWebSocket.call(void 0, );
159
+ const WebSocket2 = await _chunkC2U6KGOGcjs.importWebSocket.call(void 0, );
144
160
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
145
161
  const wsUrl = new URL(
146
162
  `${endpoint}/.test/inline-driver/connect-websocket/ws`
@@ -153,16 +169,16 @@ function createTestInlineClientDriver(endpoint, encoding, transport) {
153
169
  const finalWsUrl = `${wsProtocol}//${wsUrl.host}${wsUrl.pathname}`;
154
170
  logger().debug({ msg: "connecting to websocket", url: finalWsUrl });
155
171
  const protocols = [];
156
- protocols.push(`${_chunkPV22ZBDEcjs.WS_PROTOCOL_TARGET}actor`);
157
- protocols.push(`${_chunkPV22ZBDEcjs.WS_PROTOCOL_ACTOR}${actorId}`);
158
- protocols.push(`${_chunkPV22ZBDEcjs.WS_PROTOCOL_ENCODING}${encoding2}`);
159
- protocols.push(`${_chunkPV22ZBDEcjs.WS_PROTOCOL_TRANSPORT}${transport}`);
172
+ protocols.push(`${_chunkPELXJCJScjs.WS_PROTOCOL_TARGET}actor`);
173
+ protocols.push(`${_chunkPELXJCJScjs.WS_PROTOCOL_ACTOR}${actorId}`);
174
+ protocols.push(`${_chunkPELXJCJScjs.WS_PROTOCOL_ENCODING}${encoding2}`);
175
+ protocols.push(`${_chunkPELXJCJScjs.WS_PROTOCOL_TRANSPORT}${transport}`);
160
176
  protocols.push(
161
- `${_chunkPV22ZBDEcjs.WS_PROTOCOL_PATH}${encodeURIComponent(normalizedPath)}`
177
+ `${_chunkPELXJCJScjs.WS_PROTOCOL_PATH}${encodeURIComponent(normalizedPath)}`
162
178
  );
163
179
  if (params !== void 0) {
164
180
  protocols.push(
165
- `${_chunkPV22ZBDEcjs.WS_PROTOCOL_CONN_PARAMS}${encodeURIComponent(JSON.stringify(params))}`
181
+ `${_chunkPELXJCJScjs.WS_PROTOCOL_CONN_PARAMS}${encodeURIComponent(JSON.stringify(params))}`
166
182
  );
167
183
  }
168
184
  const ws = new WebSocket2(finalWsUrl, protocols);
@@ -518,7 +534,9 @@ async function makeInlineRequest(endpoint, encoding, transport, method, args) {
518
534
  duplex: "half"
519
535
  });
520
536
  if (!response.ok) {
521
- throw new Error(`Failed to call inline ${method}: ${response.statusText}`);
537
+ throw new Error(
538
+ `Failed to call inline ${method}: ${response.statusText}`
539
+ );
522
540
  }
523
541
  const buffer = await response.arrayBuffer();
524
542
  const callResponse = cbor.decode(
@@ -527,14 +545,14 @@ async function makeInlineRequest(endpoint, encoding, transport, method, args) {
527
545
  if ("ok" in callResponse) {
528
546
  return callResponse.ok;
529
547
  } else if ("err" in callResponse) {
530
- throw new (0, _chunkJZD6FEOEcjs.ActorError)(
548
+ throw new (0, _chunkR6XOZKMUcjs.ActorError)(
531
549
  callResponse.err.group,
532
550
  callResponse.err.code,
533
551
  callResponse.err.message,
534
552
  callResponse.err.metadata
535
553
  );
536
554
  } else {
537
- _chunkPV22ZBDEcjs.assertUnreachable.call(void 0, callResponse);
555
+ _chunkPELXJCJScjs.assertUnreachable.call(void 0, callResponse);
538
556
  }
539
557
  }
540
558
 
@@ -549,7 +567,7 @@ async function setupDriverTest(c, driverTestConfig) {
549
567
  c.onTestFinished(cleanup);
550
568
  let client;
551
569
  if (driverTestConfig.clientType === "http") {
552
- client = _chunkG6JGHCG4cjs.createClient.call(void 0, {
570
+ client = _chunk5EB77IQ2cjs.createClient.call(void 0, {
553
571
  endpoint,
554
572
  namespace,
555
573
  runnerName,
@@ -564,13 +582,13 @@ async function setupDriverTest(c, driverTestConfig) {
564
582
  encoding,
565
583
  transport
566
584
  );
567
- const runConfig = _chunkFYP3TZXDcjs.RunnerConfigSchema.parse({
585
+ const runConfig = _chunkBIOPK7IBcjs.RunnerConfigSchema.parse({
568
586
  transport,
569
587
  encoding
570
588
  });
571
- client = _chunkJZD6FEOEcjs.createClientWithDriver.call(void 0, managerDriver, runConfig);
589
+ client = _chunkR6XOZKMUcjs.createClientWithDriver.call(void 0, managerDriver, runConfig);
572
590
  } else {
573
- _chunkPV22ZBDEcjs.assertUnreachable.call(void 0, driverTestConfig.clientType);
591
+ _chunkPELXJCJScjs.assertUnreachable.call(void 0, driverTestConfig.clientType);
574
592
  }
575
593
  if (!driverTestConfig.HACK_skipCleanupNet) {
576
594
  c.onTestFinished(async () => await client.dispose());
@@ -650,7 +668,9 @@ function runActionFeaturesTests(driverTestConfig) {
650
668
  await instance.asyncWithError(true);
651
669
  _vitest.expect.fail("did not error");
652
670
  } catch (error) {
653
- _vitest.expect.call(void 0, error.message).toBe("Intentional error");
671
+ _vitest.expect.call(void 0, error.message).toBe(
672
+ "Intentional error"
673
+ );
654
674
  }
655
675
  });
656
676
  _vitest.test.call(void 0, "should handle promises returned from actions correctly", async (c) => {
@@ -697,7 +717,9 @@ function runActorConnTests(driverTestConfig) {
697
717
  });
698
718
  _vitest.test.call(void 0, "should connect using .getOrCreate().connect()", async (c) => {
699
719
  const { client } = await setupDriverTest(c, driverTestConfig);
700
- const handle = client.counter.getOrCreate(["test-get-or-create"]);
720
+ const handle = client.counter.getOrCreate([
721
+ "test-get-or-create"
722
+ ]);
701
723
  const connection = handle.connect();
702
724
  const count = await connection.increment(7);
703
725
  _vitest.expect.call(void 0, count).toBe(7);
@@ -715,7 +737,9 @@ function runActorConnTests(driverTestConfig) {
715
737
  _vitest.describe.call(void 0, "Event Communication", () => {
716
738
  _vitest.test.call(void 0, "should mix RPC calls and WebSocket events", async (c) => {
717
739
  const { client } = await setupDriverTest(c, driverTestConfig);
718
- const handle = client.counter.getOrCreate(["test-mixed-rpc-ws"]);
740
+ const handle = client.counter.getOrCreate([
741
+ "test-mixed-rpc-ws"
742
+ ]);
719
743
  const connection = handle.connect();
720
744
  const receivedEvents = [];
721
745
  connection.on("newCount", (count) => {
@@ -773,9 +797,12 @@ function runActorConnTests(driverTestConfig) {
773
797
  const handle = client.counter.getOrCreate(["test-unsubscribe"]);
774
798
  const connection = handle.connect();
775
799
  const receivedEvents = [];
776
- const unsubscribe = connection.on("newCount", (count) => {
777
- receivedEvents.push(count);
778
- });
800
+ const unsubscribe = connection.on(
801
+ "newCount",
802
+ (count) => {
803
+ receivedEvents.push(count);
804
+ }
805
+ );
779
806
  await _vitest.vi.waitFor(async () => {
780
807
  await connection.setCount(5);
781
808
  _vitest.expect.call(void 0, receivedEvents).toEqual([5]);
@@ -789,12 +816,18 @@ function runActorConnTests(driverTestConfig) {
789
816
  _vitest.describe.call(void 0, "Connection Parameters", () => {
790
817
  _vitest.test.call(void 0, "should pass connection parameters", async (c) => {
791
818
  const { client } = await setupDriverTest(c, driverTestConfig);
792
- const handle1 = client.counterWithParams.getOrCreate(["test-params"], {
793
- params: { name: "user1" }
794
- });
795
- const handle2 = client.counterWithParams.getOrCreate(["test-params"], {
796
- params: { name: "user2" }
797
- });
819
+ const handle1 = client.counterWithParams.getOrCreate(
820
+ ["test-params"],
821
+ {
822
+ params: { name: "user1" }
823
+ }
824
+ );
825
+ const handle2 = client.counterWithParams.getOrCreate(
826
+ ["test-params"],
827
+ {
828
+ params: { name: "user2" }
829
+ }
830
+ );
798
831
  const conn1 = handle1.connect();
799
832
  const conn2 = handle2.connect();
800
833
  await conn1.getInitializers();
@@ -819,7 +852,11 @@ function runActorConnTests(driverTestConfig) {
819
852
  );
820
853
  const connection = connHandle.connect();
821
854
  const events = await connection.getEvents();
822
- _vitest.expect.call(void 0, events).toEqual(["onStart", "onBeforeConnect", "onConnect"]);
855
+ _vitest.expect.call(void 0, events).toEqual([
856
+ "onStart",
857
+ "onBeforeConnect",
858
+ "onConnect"
859
+ ]);
823
860
  await connection.dispose();
824
861
  await _vitest.vi.waitFor(
825
862
  async () => {
@@ -829,7 +866,12 @@ function runActorConnTests(driverTestConfig) {
829
866
  const finalEvents = await handle.getEvents();
830
867
  _vitest.expect.call(void 0, finalEvents).toBeOneOf([
831
868
  // Still active
832
- ["onStart", "onBeforeConnect", "onConnect", "onDisconnect"],
869
+ [
870
+ "onStart",
871
+ "onBeforeConnect",
872
+ "onConnect",
873
+ "onDisconnect"
874
+ ],
833
875
  // Went to sleep and woke back up
834
876
  [
835
877
  "onStart",
@@ -936,9 +978,12 @@ function runActorConnStateTests(driverTestConfig) {
936
978
  driverTestConfig.transport === "sse" && driverTestConfig.clientType === "inline"
937
979
  )("should track connection and disconnection events", async (c) => {
938
980
  const { client } = await setupDriverTest(c, driverTestConfig);
939
- const debugHandle = client.connStateActor.getOrCreate(void 0, {
940
- params: { noCount: true }
941
- });
981
+ const debugHandle = client.connStateActor.getOrCreate(
982
+ void 0,
983
+ {
984
+ params: { noCount: true }
985
+ }
986
+ );
942
987
  const conn = client.connStateActor.getOrCreate().connect();
943
988
  const connState = await conn.getConnectionState();
944
989
  await _vitest.vi.waitFor(async () => {
@@ -1021,7 +1066,9 @@ function runActorConnStateTests(driverTestConfig) {
1021
1066
  _vitest.expect.call(void 0, success).toBe(true);
1022
1067
  _vitest.expect.call(void 0, receivedMessages.length).toBe(1);
1023
1068
  _vitest.expect.call(void 0, receivedMessages[0].from).toBe(state1.id);
1024
- _vitest.expect.call(void 0, receivedMessages[0].message).toBe("Hello from conn1");
1069
+ _vitest.expect.call(void 0, receivedMessages[0].message).toBe(
1070
+ "Hello from conn1"
1071
+ );
1025
1072
  });
1026
1073
  await conn1.dispose();
1027
1074
  await conn2.dispose();
@@ -1042,7 +1089,10 @@ function runActorScheduleTests(driverTestConfig) {
1042
1089
  () => {
1043
1090
  _vitest.describe.call(void 0, "Scheduled Alarms", () => {
1044
1091
  _vitest.test.call(void 0, "executes c.schedule.at() with specific timestamp", async (c) => {
1045
- const { client } = await setupDriverTest(c, driverTestConfig);
1092
+ const { client } = await setupDriverTest(
1093
+ c,
1094
+ driverTestConfig
1095
+ );
1046
1096
  const scheduled = client.scheduled.getOrCreate();
1047
1097
  const timestamp = Date.now() + 250;
1048
1098
  await scheduled.scheduleTaskAt(timestamp);
@@ -1053,7 +1103,10 @@ function runActorScheduleTests(driverTestConfig) {
1053
1103
  _vitest.expect.call(void 0, scheduledCount).toBe(1);
1054
1104
  });
1055
1105
  _vitest.test.call(void 0, "executes c.schedule.after() with delay", async (c) => {
1056
- const { client } = await setupDriverTest(c, driverTestConfig);
1106
+ const { client } = await setupDriverTest(
1107
+ c,
1108
+ driverTestConfig
1109
+ );
1057
1110
  const scheduled = client.scheduled.getOrCreate();
1058
1111
  await scheduled.scheduleTaskAfter(250);
1059
1112
  await waitFor(driverTestConfig, 500);
@@ -1063,7 +1116,10 @@ function runActorScheduleTests(driverTestConfig) {
1063
1116
  _vitest.expect.call(void 0, scheduledCount).toBe(1);
1064
1117
  });
1065
1118
  _vitest.test.call(void 0, "multiple scheduled tasks execute in order", async (c) => {
1066
- const { client } = await setupDriverTest(c, driverTestConfig);
1119
+ const { client } = await setupDriverTest(
1120
+ c,
1121
+ driverTestConfig
1122
+ );
1067
1123
  const scheduled = client.scheduled.getOrCreate();
1068
1124
  await scheduled.clearHistory();
1069
1125
  await scheduled.scheduleTaskAfterWithId("first", 250);
@@ -1089,7 +1145,7 @@ function runActorScheduleTests(driverTestConfig) {
1089
1145
 
1090
1146
  // fixtures/driver-test-suite/sleep.ts
1091
1147
  var SLEEP_TIMEOUT = 1e3;
1092
- var sleep = _chunk2S7HJMMYcjs.actor.call(void 0, {
1148
+ var sleep = _chunkOAB7ECABcjs.actor.call(void 0, {
1093
1149
  state: { startCount: 0, sleepCount: 0 },
1094
1150
  onStart: (c) => {
1095
1151
  c.state.startCount += 1;
@@ -1102,7 +1158,10 @@ var sleep = _chunk2S7HJMMYcjs.actor.call(void 0, {
1102
1158
  c.sleep();
1103
1159
  },
1104
1160
  getCounts: (c) => {
1105
- return { startCount: c.state.startCount, sleepCount: c.state.sleepCount };
1161
+ return {
1162
+ startCount: c.state.startCount,
1163
+ sleepCount: c.state.sleepCount
1164
+ };
1106
1165
  },
1107
1166
  setAlarm: async (c, duration) => {
1108
1167
  await c.schedule.after(duration, "onAlarm");
@@ -1115,7 +1174,7 @@ var sleep = _chunk2S7HJMMYcjs.actor.call(void 0, {
1115
1174
  sleepTimeout: SLEEP_TIMEOUT
1116
1175
  }
1117
1176
  });
1118
- var sleepWithLongRpc = _chunk2S7HJMMYcjs.actor.call(void 0, {
1177
+ var sleepWithLongRpc = _chunkOAB7ECABcjs.actor.call(void 0, {
1119
1178
  state: { startCount: 0, sleepCount: 0 },
1120
1179
  createVars: () => ({}),
1121
1180
  onStart: (c) => {
@@ -1126,11 +1185,14 @@ var sleepWithLongRpc = _chunk2S7HJMMYcjs.actor.call(void 0, {
1126
1185
  },
1127
1186
  actions: {
1128
1187
  getCounts: (c) => {
1129
- return { startCount: c.state.startCount, sleepCount: c.state.sleepCount };
1188
+ return {
1189
+ startCount: c.state.startCount,
1190
+ sleepCount: c.state.sleepCount
1191
+ };
1130
1192
  },
1131
1193
  longRunningRpc: async (c) => {
1132
1194
  c.log.info("starting long running rpc");
1133
- c.vars.longRunningResolve = _chunkKUZWEM23cjs.promiseWithResolvers.call(void 0, );
1195
+ c.vars.longRunningResolve = _chunk6Z3YA6QRcjs.promiseWithResolvers.call(void 0, );
1134
1196
  c.broadcast("waiting");
1135
1197
  await c.vars.longRunningResolve.promise;
1136
1198
  c.log.info("finished long running rpc");
@@ -1144,7 +1206,7 @@ var sleepWithLongRpc = _chunk2S7HJMMYcjs.actor.call(void 0, {
1144
1206
  sleepTimeout: SLEEP_TIMEOUT
1145
1207
  }
1146
1208
  });
1147
- var sleepWithRawHttp = _chunk2S7HJMMYcjs.actor.call(void 0, {
1209
+ var sleepWithRawHttp = _chunkOAB7ECABcjs.actor.call(void 0, {
1148
1210
  state: { startCount: 0, sleepCount: 0, requestCount: 0 },
1149
1211
  onStart: (c) => {
1150
1212
  c.state.startCount += 1;
@@ -1156,7 +1218,9 @@ var sleepWithRawHttp = _chunk2S7HJMMYcjs.actor.call(void 0, {
1156
1218
  c.state.requestCount += 1;
1157
1219
  const url = new URL(request.url);
1158
1220
  if (url.pathname === "/long-request") {
1159
- const duration = parseInt(url.searchParams.get("duration") || "1000");
1221
+ const duration = parseInt(
1222
+ url.searchParams.get("duration") || "1000"
1223
+ );
1160
1224
  c.log.info({ msg: "starting long fetch request", duration });
1161
1225
  await new Promise((resolve) => setTimeout(resolve, duration));
1162
1226
  c.log.info("finished long fetch request");
@@ -1179,7 +1243,7 @@ var sleepWithRawHttp = _chunk2S7HJMMYcjs.actor.call(void 0, {
1179
1243
  sleepTimeout: SLEEP_TIMEOUT
1180
1244
  }
1181
1245
  });
1182
- var sleepWithRawWebSocket = _chunk2S7HJMMYcjs.actor.call(void 0, {
1246
+ var sleepWithRawWebSocket = _chunkOAB7ECABcjs.actor.call(void 0, {
1183
1247
  state: { startCount: 0, sleepCount: 0, connectionCount: 0 },
1184
1248
  onStart: (c) => {
1185
1249
  c.state.startCount += 1;
@@ -1242,7 +1306,7 @@ var sleepWithRawWebSocket = _chunk2S7HJMMYcjs.actor.call(void 0, {
1242
1306
  sleepTimeout: SLEEP_TIMEOUT
1243
1307
  }
1244
1308
  });
1245
- var sleepWithNoSleepOption = _chunk2S7HJMMYcjs.actor.call(void 0, {
1309
+ var sleepWithNoSleepOption = _chunkOAB7ECABcjs.actor.call(void 0, {
1246
1310
  state: { startCount: 0, sleepCount: 0 },
1247
1311
  onStart: (c) => {
1248
1312
  c.state.startCount += 1;
@@ -1252,7 +1316,10 @@ var sleepWithNoSleepOption = _chunk2S7HJMMYcjs.actor.call(void 0, {
1252
1316
  },
1253
1317
  actions: {
1254
1318
  getCounts: (c) => {
1255
- return { startCount: c.state.startCount, sleepCount: c.state.sleepCount };
1319
+ return {
1320
+ startCount: c.state.startCount,
1321
+ sleepCount: c.state.sleepCount
1322
+ };
1256
1323
  }
1257
1324
  },
1258
1325
  options: {
@@ -1675,7 +1742,9 @@ function runActorHandleTests(driverTestConfig) {
1675
1742
  });
1676
1743
  _vitest.test.call(void 0, "should use .getForId() to access a actor by ID", async (c) => {
1677
1744
  const { client } = await setupDriverTest(c, driverTestConfig);
1678
- const handle = client.counter.getOrCreate(["test-get-for-id-handle"]);
1745
+ const handle = client.counter.getOrCreate([
1746
+ "test-get-for-id-handle"
1747
+ ]);
1679
1748
  await handle.increment(3);
1680
1749
  const actorId = await handle.resolve();
1681
1750
  const idHandle = client.counter.getForId(actorId);
@@ -1699,7 +1768,9 @@ function runActorHandleTests(driverTestConfig) {
1699
1768
  });
1700
1769
  _vitest.test.call(void 0, "should use (await create()) to create and return a handle", async (c) => {
1701
1770
  const { client } = await setupDriverTest(c, driverTestConfig);
1702
- const handle = await client.counter.create(["test-create-handle"]);
1771
+ const handle = await client.counter.create([
1772
+ "test-create-handle"
1773
+ ]);
1703
1774
  const count = await handle.increment(9);
1704
1775
  _vitest.expect.call(void 0, count).toBe(9);
1705
1776
  const retrievedCount = await handle.getCount();
@@ -1722,7 +1793,9 @@ function runActorHandleTests(driverTestConfig) {
1722
1793
  const missingId = `nonexistent-${crypto.randomUUID()}`;
1723
1794
  try {
1724
1795
  await client.counter.get([missingId]).resolve();
1725
- _vitest.expect.fail("did not error for get().resolve() on missing actor");
1796
+ _vitest.expect.fail(
1797
+ "did not error for get().resolve() on missing actor"
1798
+ );
1726
1799
  } catch (err) {
1727
1800
  _vitest.expect.call(void 0, err.group).toBe("actor");
1728
1801
  _vitest.expect.call(void 0, err.code).toBe("not_found");
@@ -1732,7 +1805,9 @@ function runActorHandleTests(driverTestConfig) {
1732
1805
  _vitest.describe.call(void 0, "Action Functionality", () => {
1733
1806
  _vitest.test.call(void 0, "should call actions directly on the handle", async (c) => {
1734
1807
  const { client } = await setupDriverTest(c, driverTestConfig);
1735
- const handle = client.counter.getOrCreate(["test-action-handle"]);
1808
+ const handle = client.counter.getOrCreate([
1809
+ "test-action-handle"
1810
+ ]);
1736
1811
  const count1 = await handle.increment(3);
1737
1812
  _vitest.expect.call(void 0, count1).toBe(3);
1738
1813
  const count2 = await handle.increment(5);
@@ -1742,7 +1817,9 @@ function runActorHandleTests(driverTestConfig) {
1742
1817
  });
1743
1818
  _vitest.test.call(void 0, "should handle independent handles to the same actor", async (c) => {
1744
1819
  const { client } = await setupDriverTest(c, driverTestConfig);
1745
- const handle1 = client.counter.getOrCreate(["test-multiple-handles"]);
1820
+ const handle1 = client.counter.getOrCreate([
1821
+ "test-multiple-handles"
1822
+ ]);
1746
1823
  const handle2 = client.counter.get(["test-multiple-handles"]);
1747
1824
  await handle1.increment(3);
1748
1825
  const count = await handle2.getCount();
@@ -1801,16 +1878,18 @@ function runActorHandleTests(driverTestConfig) {
1801
1878
  _vitest.expect.call(void 0,
1802
1879
  eventsAfterAction.filter((e) => e === "onBeforeConnect").length
1803
1880
  ).toBe(1);
1804
- _vitest.expect.call(void 0, eventsAfterAction.filter((e) => e === "onConnect").length).toBe(
1805
- 1
1806
- );
1881
+ _vitest.expect.call(void 0,
1882
+ eventsAfterAction.filter((e) => e === "onConnect").length
1883
+ ).toBe(1);
1807
1884
  _vitest.expect.call(void 0,
1808
1885
  eventsAfterAction.filter((e) => e === "onDisconnect").length
1809
1886
  ).toBe(1);
1810
1887
  await trackingHandle.increment(10);
1811
1888
  const eventsAfterSecondAction = await viewHandle.getEvents();
1812
1889
  _vitest.expect.call(void 0,
1813
- eventsAfterSecondAction.filter((e) => e === "onBeforeConnect").length
1890
+ eventsAfterSecondAction.filter(
1891
+ (e) => e === "onBeforeConnect"
1892
+ ).length
1814
1893
  ).toBe(2);
1815
1894
  _vitest.expect.call(void 0,
1816
1895
  eventsAfterSecondAction.filter((e) => e === "onConnect").length
@@ -1836,9 +1915,13 @@ function runActorHandleTests(driverTestConfig) {
1836
1915
  await trackingHandle2.increment(10);
1837
1916
  const events = await viewHandle.getEvents();
1838
1917
  _vitest.expect.call(void 0, events.filter((e) => e === "onStart").length).toBe(1);
1839
- _vitest.expect.call(void 0, events.filter((e) => e === "onBeforeConnect").length).toBe(2);
1918
+ _vitest.expect.call(void 0,
1919
+ events.filter((e) => e === "onBeforeConnect").length
1920
+ ).toBe(2);
1840
1921
  _vitest.expect.call(void 0, events.filter((e) => e === "onConnect").length).toBe(2);
1841
- _vitest.expect.call(void 0, events.filter((e) => e === "onDisconnect").length).toBe(2);
1922
+ _vitest.expect.call(void 0, events.filter((e) => e === "onDisconnect").length).toBe(
1923
+ 2
1924
+ );
1842
1925
  });
1843
1926
  });
1844
1927
  });
@@ -1851,23 +1934,25 @@ function runActorInlineClientTests(driverTestConfig) {
1851
1934
  _vitest.describe.call(void 0, "Stateless Client Calls", () => {
1852
1935
  _vitest.test.call(void 0, "should make stateless calls to other actors", async (c) => {
1853
1936
  const { client } = await setupDriverTest(c, driverTestConfig);
1854
- const inlineClientHandle = client.inlineClientActor.getOrCreate([
1855
- "inline-client-test"
1856
- ]);
1937
+ const inlineClientHandle = client.inlineClientActor.getOrCreate(
1938
+ ["inline-client-test"]
1939
+ );
1857
1940
  const result = await inlineClientHandle.callCounterIncrement(5);
1858
1941
  _vitest.expect.call(void 0, result).toBe(5);
1859
1942
  const counterState = await inlineClientHandle.getCounterState();
1860
1943
  _vitest.expect.call(void 0, counterState).toBe(5);
1861
1944
  const messages = await inlineClientHandle.getMessages();
1862
1945
  _vitest.expect.call(void 0, messages).toHaveLength(2);
1863
- _vitest.expect.call(void 0, messages[0]).toContain("Called counter.increment(5), result: 5");
1946
+ _vitest.expect.call(void 0, messages[0]).toContain(
1947
+ "Called counter.increment(5), result: 5"
1948
+ );
1864
1949
  _vitest.expect.call(void 0, messages[1]).toContain("Got counter state: 5");
1865
1950
  });
1866
1951
  _vitest.test.call(void 0, "should handle multiple stateless calls", async (c) => {
1867
1952
  const { client } = await setupDriverTest(c, driverTestConfig);
1868
- const inlineClientHandle = client.inlineClientActor.getOrCreate([
1869
- "inline-client-multi"
1870
- ]);
1953
+ const inlineClientHandle = client.inlineClientActor.getOrCreate(
1954
+ ["inline-client-multi"]
1955
+ );
1871
1956
  await inlineClientHandle.clearMessages();
1872
1957
  const result1 = await inlineClientHandle.callCounterIncrement(3);
1873
1958
  const result2 = await inlineClientHandle.callCounterIncrement(7);
@@ -1877,7 +1962,9 @@ function runActorInlineClientTests(driverTestConfig) {
1877
1962
  _vitest.expect.call(void 0, finalState).toBe(10);
1878
1963
  const messages = await inlineClientHandle.getMessages();
1879
1964
  _vitest.expect.call(void 0, messages).toHaveLength(3);
1880
- _vitest.expect.call(void 0, messages[0]).toContain("Called counter.increment(3), result: 3");
1965
+ _vitest.expect.call(void 0, messages[0]).toContain(
1966
+ "Called counter.increment(3), result: 3"
1967
+ );
1881
1968
  _vitest.expect.call(void 0, messages[1]).toContain(
1882
1969
  "Called counter.increment(7), result: 10"
1883
1970
  );
@@ -1887,9 +1974,9 @@ function runActorInlineClientTests(driverTestConfig) {
1887
1974
  _vitest.describe.call(void 0, "Stateful Client Calls", () => {
1888
1975
  _vitest.test.call(void 0, "should connect to other actors and receive events", async (c) => {
1889
1976
  const { client } = await setupDriverTest(c, driverTestConfig);
1890
- const inlineClientHandle = client.inlineClientActor.getOrCreate([
1891
- "inline-client-stateful"
1892
- ]);
1977
+ const inlineClientHandle = client.inlineClientActor.getOrCreate(
1978
+ ["inline-client-stateful"]
1979
+ );
1893
1980
  await inlineClientHandle.clearMessages();
1894
1981
  const result = await inlineClientHandle.connectToCounterAndIncrement(4);
1895
1982
  _vitest.expect.call(void 0, result.result1).toBe(4);
@@ -1905,9 +1992,9 @@ function runActorInlineClientTests(driverTestConfig) {
1905
1992
  });
1906
1993
  _vitest.test.call(void 0, "should handle stateful connection independently", async (c) => {
1907
1994
  const { client } = await setupDriverTest(c, driverTestConfig);
1908
- const inlineClientHandle = client.inlineClientActor.getOrCreate([
1909
- "inline-client-independent"
1910
- ]);
1995
+ const inlineClientHandle = client.inlineClientActor.getOrCreate(
1996
+ ["inline-client-independent"]
1997
+ );
1911
1998
  await inlineClientHandle.clearMessages();
1912
1999
  const result = await inlineClientHandle.connectToCounterAndIncrement(2);
1913
2000
  _vitest.expect.call(void 0, result.result1).toBe(2);
@@ -1923,9 +2010,9 @@ function runActorInlineClientTests(driverTestConfig) {
1923
2010
  _vitest.describe.call(void 0, "Mixed Client Usage", () => {
1924
2011
  _vitest.test.call(void 0, "should handle both stateless and stateful calls", async (c) => {
1925
2012
  const { client } = await setupDriverTest(c, driverTestConfig);
1926
- const inlineClientHandle = client.inlineClientActor.getOrCreate([
1927
- "inline-client-mixed"
1928
- ]);
2013
+ const inlineClientHandle = client.inlineClientActor.getOrCreate(
2014
+ ["inline-client-mixed"]
2015
+ );
1929
2016
  await inlineClientHandle.clearMessages();
1930
2017
  await inlineClientHandle.callCounterIncrement(1);
1931
2018
  const statelessResult = await inlineClientHandle.getCounterState();
@@ -1935,7 +2022,9 @@ function runActorInlineClientTests(driverTestConfig) {
1935
2022
  _vitest.expect.call(void 0, statefulResult.result2).toBe(9);
1936
2023
  const messages = await inlineClientHandle.getMessages();
1937
2024
  _vitest.expect.call(void 0, messages).toHaveLength(3);
1938
- _vitest.expect.call(void 0, messages[0]).toContain("Called counter.increment(1), result: 1");
2025
+ _vitest.expect.call(void 0, messages[0]).toContain(
2026
+ "Called counter.increment(1), result: 1"
2027
+ );
1939
2028
  _vitest.expect.call(void 0, messages[1]).toContain("Got counter state: 1");
1940
2029
  _vitest.expect.call(void 0, messages[2]).toContain(
1941
2030
  "Connected to counter, incremented by 3 and 6"
@@ -1952,25 +2041,34 @@ function runActorInspectorTests(driverTestConfig) {
1952
2041
  _vitest.describe.call(void 0, "Manager Inspector", () => {
1953
2042
  _vitest.test.call(void 0, "should respond to ping", async (c) => {
1954
2043
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
1955
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1956
- headers: {
1957
- Authorization: `Bearer token`
2044
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2045
+ `${endpoint}/inspect`,
2046
+ {
2047
+ headers: {
2048
+ Authorization: `Bearer token`
2049
+ }
1958
2050
  }
1959
- });
2051
+ );
1960
2052
  const response = await http.ping.$get();
1961
2053
  _vitest.expect.call(void 0, response.status).toBe(200);
1962
2054
  const data = await response.json();
1963
2055
  _vitest.expect.call(void 0, data).toEqual({ message: "pong" });
1964
2056
  });
1965
2057
  _vitest.test.call(void 0, "should get actors with pagination", async (c) => {
1966
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2058
+ const { client, endpoint } = await setupDriverTest(
2059
+ c,
2060
+ driverTestConfig
2061
+ );
1967
2062
  await client.counter.create(["test-actor-1"]);
1968
2063
  await client.counter.create(["test-actor-2"]);
1969
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1970
- headers: {
1971
- Authorization: `Bearer token`
2064
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2065
+ `${endpoint}/inspect`,
2066
+ {
2067
+ headers: {
2068
+ Authorization: `Bearer token`
2069
+ }
1972
2070
  }
1973
- });
2071
+ );
1974
2072
  const response = await http.actors.$get({
1975
2073
  query: { limit: "1" }
1976
2074
  });
@@ -1984,16 +2082,22 @@ function runActorInspectorTests(driverTestConfig) {
1984
2082
  _vitest.expect.call(void 0, data.length).toBe(1);
1985
2083
  });
1986
2084
  _vitest.test.call(void 0, "should get all actors with pagination", async (c) => {
1987
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2085
+ const { client, endpoint } = await setupDriverTest(
2086
+ c,
2087
+ driverTestConfig
2088
+ );
1988
2089
  const actorKey1 = ["test-cursor-1"];
1989
2090
  const actorKey2 = ["test-cursor-2"];
1990
2091
  await client.counter.create(actorKey1);
1991
2092
  await client.counter.create(actorKey2);
1992
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
1993
- headers: {
1994
- Authorization: `Bearer token`
2093
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2094
+ `${endpoint}/inspect`,
2095
+ {
2096
+ headers: {
2097
+ Authorization: `Bearer token`
2098
+ }
1995
2099
  }
1996
- });
2100
+ );
1997
2101
  const response = await http.actors.$get({
1998
2102
  query: { limit: "5" }
1999
2103
  });
@@ -2014,11 +2118,14 @@ function runActorInspectorTests(driverTestConfig) {
2014
2118
  });
2015
2119
  _vitest.test.call(void 0, "should handle invalid limit parameter", async (c) => {
2016
2120
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2017
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2018
- headers: {
2019
- Authorization: `Bearer token`
2121
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2122
+ `${endpoint}/inspect`,
2123
+ {
2124
+ headers: {
2125
+ Authorization: `Bearer token`
2126
+ }
2020
2127
  }
2021
- });
2128
+ );
2022
2129
  const response = await http.actors.$get({
2023
2130
  query: { limit: "0" }
2024
2131
  });
@@ -2026,11 +2133,14 @@ function runActorInspectorTests(driverTestConfig) {
2026
2133
  });
2027
2134
  _vitest.test.call(void 0, "should create a new actor", async (c) => {
2028
2135
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2029
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2030
- headers: {
2031
- Authorization: `Bearer token`
2136
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2137
+ `${endpoint}/inspect`,
2138
+ {
2139
+ headers: {
2140
+ Authorization: `Bearer token`
2141
+ }
2032
2142
  }
2033
- });
2143
+ );
2034
2144
  const response = await http.actors.$post({
2035
2145
  json: {
2036
2146
  name: "default",
@@ -2050,11 +2160,14 @@ function runActorInspectorTests(driverTestConfig) {
2050
2160
  });
2051
2161
  _vitest.test.call(void 0, "should get builds", async (c) => {
2052
2162
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2053
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2054
- headers: {
2055
- Authorization: `Bearer token`
2163
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2164
+ `${endpoint}/inspect`,
2165
+ {
2166
+ headers: {
2167
+ Authorization: `Bearer token`
2168
+ }
2056
2169
  }
2057
- });
2170
+ );
2058
2171
  const response = await http.builds.$get();
2059
2172
  _vitest.expect.call(void 0, response.status).toBe(200);
2060
2173
  const data = await response.json();
@@ -2065,14 +2178,20 @@ function runActorInspectorTests(driverTestConfig) {
2065
2178
  );
2066
2179
  });
2067
2180
  _vitest.test.call(void 0, "should get actor by id", async (c) => {
2068
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2181
+ const { client, endpoint } = await setupDriverTest(
2182
+ c,
2183
+ driverTestConfig
2184
+ );
2069
2185
  const handle = await client.counter.create(["test-get-by-id"]);
2070
2186
  const actorId = await handle.resolve();
2071
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2072
- headers: {
2073
- Authorization: `Bearer token`
2187
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2188
+ `${endpoint}/inspect`,
2189
+ {
2190
+ headers: {
2191
+ Authorization: `Bearer token`
2192
+ }
2074
2193
  }
2075
- });
2194
+ );
2076
2195
  const response = await http.actor[":id"].$get({
2077
2196
  param: { id: actorId }
2078
2197
  });
@@ -2082,11 +2201,14 @@ function runActorInspectorTests(driverTestConfig) {
2082
2201
  });
2083
2202
  _vitest.test.call(void 0, "should return 404 for non-existent actor", async (c) => {
2084
2203
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2085
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2086
- headers: {
2087
- Authorization: `Bearer token`
2204
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2205
+ `${endpoint}/inspect`,
2206
+ {
2207
+ headers: {
2208
+ Authorization: `Bearer token`
2209
+ }
2088
2210
  }
2089
- });
2211
+ );
2090
2212
  const response = await http.actor[":id"].$get({
2091
2213
  param: { id: "non-existent-id" }
2092
2214
  });
@@ -2095,14 +2217,20 @@ function runActorInspectorTests(driverTestConfig) {
2095
2217
  _vitest.expect.call(void 0, data).toEqual({ error: "Actor not found" });
2096
2218
  });
2097
2219
  _vitest.test.call(void 0, "should get bootstrap data", async (c) => {
2098
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2220
+ const { client, endpoint } = await setupDriverTest(
2221
+ c,
2222
+ driverTestConfig
2223
+ );
2099
2224
  const handle = await client.counter.create(["test-bootstrap"]);
2100
2225
  await handle.resolve();
2101
- const http = _chunkDUOTOMP7cjs.createManagerInspectorClient.call(void 0, `${endpoint}/inspect`, {
2102
- headers: {
2103
- Authorization: `Bearer token`
2226
+ const http = _chunkLCQDY73Vcjs.createManagerInspectorClient.call(void 0,
2227
+ `${endpoint}/inspect`,
2228
+ {
2229
+ headers: {
2230
+ Authorization: `Bearer token`
2231
+ }
2104
2232
  }
2105
- });
2233
+ );
2106
2234
  const response = await http.bootstrap.$get();
2107
2235
  _vitest.expect.call(void 0, response.status).toBe(200);
2108
2236
  const data = await response.json();
@@ -2120,47 +2248,62 @@ function runActorInspectorTests(driverTestConfig) {
2120
2248
  _vitest.test.call(void 0, "should handle actor not found", async (c) => {
2121
2249
  const { endpoint } = await setupDriverTest(c, driverTestConfig);
2122
2250
  const actorId = "non-existing";
2123
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2124
- headers: {
2125
- Authorization: `Bearer token`,
2126
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2127
- getForId: { name: "counter", actorId }
2128
- })
2251
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2252
+ `${endpoint}/actors/inspect`,
2253
+ {
2254
+ headers: {
2255
+ Authorization: `Bearer token`,
2256
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2257
+ getForId: { name: "counter", actorId }
2258
+ })
2259
+ }
2129
2260
  }
2130
- });
2261
+ );
2131
2262
  const response = await http.ping.$get();
2132
2263
  _vitest.expect.call(void 0, response.ok).toBe(false);
2133
2264
  });
2134
2265
  _vitest.test.call(void 0, "should respond to ping", async (c) => {
2135
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2266
+ const { client, endpoint } = await setupDriverTest(
2267
+ c,
2268
+ driverTestConfig
2269
+ );
2136
2270
  const handle = await client.counter.create(["test-ping"]);
2137
2271
  const actorId = await handle.resolve();
2138
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2139
- headers: {
2140
- Authorization: `Bearer token`,
2141
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2142
- getForId: { name: "counter", actorId }
2143
- })
2272
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2273
+ `${endpoint}/actors/inspect`,
2274
+ {
2275
+ headers: {
2276
+ Authorization: `Bearer token`,
2277
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2278
+ getForId: { name: "counter", actorId }
2279
+ })
2280
+ }
2144
2281
  }
2145
- });
2282
+ );
2146
2283
  const response = await http.ping.$get();
2147
2284
  _vitest.expect.call(void 0, response.status).toBe(200);
2148
2285
  const data = await response.json();
2149
2286
  _vitest.expect.call(void 0, data).toEqual({ message: "pong" });
2150
2287
  });
2151
2288
  _vitest.test.call(void 0, "should get actor state", async (c) => {
2152
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2289
+ const { client, endpoint } = await setupDriverTest(
2290
+ c,
2291
+ driverTestConfig
2292
+ );
2153
2293
  const handle = await client.counter.create(["test-state"]);
2154
2294
  const actorId = await handle.resolve();
2155
2295
  await handle.increment(5);
2156
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2157
- headers: {
2158
- Authorization: `Bearer token`,
2159
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2160
- getForId: { name: "counter", actorId }
2161
- })
2296
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2297
+ `${endpoint}/actors/inspect`,
2298
+ {
2299
+ headers: {
2300
+ Authorization: `Bearer token`,
2301
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2302
+ getForId: { name: "counter", actorId }
2303
+ })
2304
+ }
2162
2305
  }
2163
- });
2306
+ );
2164
2307
  const response = await http.state.$get();
2165
2308
  _vitest.expect.call(void 0, response.status).toBe(200);
2166
2309
  const data = await response.json();
@@ -2172,17 +2315,25 @@ function runActorInspectorTests(driverTestConfig) {
2172
2315
  });
2173
2316
  });
2174
2317
  _vitest.test.call(void 0, "should update actor state with replace", async (c) => {
2175
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2176
- const handle = await client.counter.create(["test-state-replace"]);
2318
+ const { client, endpoint } = await setupDriverTest(
2319
+ c,
2320
+ driverTestConfig
2321
+ );
2322
+ const handle = await client.counter.create([
2323
+ "test-state-replace"
2324
+ ]);
2177
2325
  const actorId = await handle.resolve();
2178
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2179
- headers: {
2180
- Authorization: `Bearer token`,
2181
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2182
- getForId: { name: "counter", actorId }
2183
- })
2326
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2327
+ `${endpoint}/actors/inspect`,
2328
+ {
2329
+ headers: {
2330
+ Authorization: `Bearer token`,
2331
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2332
+ getForId: { name: "counter", actorId }
2333
+ })
2334
+ }
2184
2335
  }
2185
- });
2336
+ );
2186
2337
  const response = await http.state.$patch({
2187
2338
  json: {
2188
2339
  replace: { count: 10 }
@@ -2196,18 +2347,26 @@ function runActorInspectorTests(driverTestConfig) {
2196
2347
  });
2197
2348
  });
2198
2349
  _vitest.test.call(void 0, "should update actor state with patch", async (c) => {
2199
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2200
- const handle = await client.counter.create(["test-state-patch"]);
2350
+ const { client, endpoint } = await setupDriverTest(
2351
+ c,
2352
+ driverTestConfig
2353
+ );
2354
+ const handle = await client.counter.create([
2355
+ "test-state-patch"
2356
+ ]);
2201
2357
  const actorId = await handle.resolve();
2202
2358
  await handle.increment(3);
2203
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2204
- headers: {
2205
- Authorization: `Bearer token`,
2206
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2207
- getForId: { name: "counter", actorId }
2208
- })
2359
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2360
+ `${endpoint}/actors/inspect`,
2361
+ {
2362
+ headers: {
2363
+ Authorization: `Bearer token`,
2364
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2365
+ getForId: { name: "counter", actorId }
2366
+ })
2367
+ }
2209
2368
  }
2210
- });
2369
+ );
2211
2370
  const response = await http.state.$patch({
2212
2371
  json: {
2213
2372
  patch: [
@@ -2229,19 +2388,27 @@ function runActorInspectorTests(driverTestConfig) {
2229
2388
  });
2230
2389
  });
2231
2390
  _vitest.test.call(void 0, "should get actor connections", async (c) => {
2232
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2233
- const handle = await client.counter.create(["test-connections"]);
2391
+ const { client, endpoint } = await setupDriverTest(
2392
+ c,
2393
+ driverTestConfig
2394
+ );
2395
+ const handle = await client.counter.create([
2396
+ "test-connections"
2397
+ ]);
2234
2398
  const actorId = await handle.resolve();
2235
2399
  handle.connect();
2236
2400
  await handle.increment(10);
2237
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2238
- headers: {
2239
- Authorization: `Bearer token`,
2240
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2241
- getForId: { name: "counter", actorId }
2242
- })
2401
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2402
+ `${endpoint}/actors/inspect`,
2403
+ {
2404
+ headers: {
2405
+ Authorization: `Bearer token`,
2406
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2407
+ getForId: { name: "counter", actorId }
2408
+ })
2409
+ }
2243
2410
  }
2244
- });
2411
+ );
2245
2412
  const response = await http.connections.$get();
2246
2413
  _vitest.expect.call(void 0, response.status).toBe(200);
2247
2414
  const data = await response.json();
@@ -2254,19 +2421,25 @@ function runActorInspectorTests(driverTestConfig) {
2254
2421
  );
2255
2422
  });
2256
2423
  _vitest.test.call(void 0, "should get actor events", async (c) => {
2257
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2424
+ const { client, endpoint } = await setupDriverTest(
2425
+ c,
2426
+ driverTestConfig
2427
+ );
2258
2428
  const handle = await client.counter.create(["test-events"]);
2259
2429
  const actorId = await handle.resolve();
2260
2430
  handle.connect();
2261
2431
  await handle.increment(10);
2262
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2263
- headers: {
2264
- Authorization: `Bearer token`,
2265
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2266
- getForId: { name: "counter", actorId }
2267
- })
2432
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2433
+ `${endpoint}/actors/inspect`,
2434
+ {
2435
+ headers: {
2436
+ Authorization: `Bearer token`,
2437
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2438
+ getForId: { name: "counter", actorId }
2439
+ })
2440
+ }
2268
2441
  }
2269
- });
2442
+ );
2270
2443
  const response = await http.events.$get();
2271
2444
  _vitest.expect.call(void 0, response.status).toBe(200);
2272
2445
  const data = await response.json();
@@ -2280,19 +2453,27 @@ function runActorInspectorTests(driverTestConfig) {
2280
2453
  );
2281
2454
  });
2282
2455
  _vitest.test.call(void 0, "should clear actor events", async (c) => {
2283
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2284
- const handle = await client.counter.create(["test-events-clear"]);
2456
+ const { client, endpoint } = await setupDriverTest(
2457
+ c,
2458
+ driverTestConfig
2459
+ );
2460
+ const handle = await client.counter.create([
2461
+ "test-events-clear"
2462
+ ]);
2285
2463
  const actorId = await handle.resolve();
2286
2464
  handle.connect();
2287
2465
  await handle.increment(10);
2288
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2289
- headers: {
2290
- Authorization: `Bearer token`,
2291
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2292
- getForId: { name: "counter", actorId }
2293
- })
2466
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2467
+ `${endpoint}/actors/inspect`,
2468
+ {
2469
+ headers: {
2470
+ Authorization: `Bearer token`,
2471
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2472
+ getForId: { name: "counter", actorId }
2473
+ })
2474
+ }
2294
2475
  }
2295
- });
2476
+ );
2296
2477
  {
2297
2478
  const response2 = await http.events.$get();
2298
2479
  _vitest.expect.call(void 0, response2.status).toBe(200);
@@ -2310,17 +2491,23 @@ function runActorInspectorTests(driverTestConfig) {
2310
2491
  _vitest.expect.call(void 0, response.status).toBe(200);
2311
2492
  });
2312
2493
  _vitest.test.call(void 0, "should get actor rpcs", async (c) => {
2313
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2494
+ const { client, endpoint } = await setupDriverTest(
2495
+ c,
2496
+ driverTestConfig
2497
+ );
2314
2498
  const handle = await client.counter.create(["test-rpcs"]);
2315
2499
  const actorId = await handle.resolve();
2316
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2317
- headers: {
2318
- Authorization: `Bearer token`,
2319
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2320
- getForId: { name: "counter", actorId }
2321
- })
2500
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2501
+ `${endpoint}/actors/inspect`,
2502
+ {
2503
+ headers: {
2504
+ Authorization: `Bearer token`,
2505
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2506
+ getForId: { name: "counter", actorId }
2507
+ })
2508
+ }
2322
2509
  }
2323
- });
2510
+ );
2324
2511
  const response = await http.rpcs.$get();
2325
2512
  _vitest.expect.call(void 0, response.status).toBe(200);
2326
2513
  const data = await response.json();
@@ -2331,17 +2518,23 @@ function runActorInspectorTests(driverTestConfig) {
2331
2518
  );
2332
2519
  });
2333
2520
  _vitest.test.skip("should get actor database info", async (c) => {
2334
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2521
+ const { client, endpoint } = await setupDriverTest(
2522
+ c,
2523
+ driverTestConfig
2524
+ );
2335
2525
  const handle = await client.counter.create(["test-db"]);
2336
2526
  const actorId = await handle.resolve();
2337
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2338
- headers: {
2339
- Authorization: `Bearer token`,
2340
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2341
- getForId: { name: "counter", actorId }
2342
- })
2527
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2528
+ `${endpoint}/actors/inspect`,
2529
+ {
2530
+ headers: {
2531
+ Authorization: `Bearer token`,
2532
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2533
+ getForId: { name: "counter", actorId }
2534
+ })
2535
+ }
2343
2536
  }
2344
- });
2537
+ );
2345
2538
  const response = await http.db.$get();
2346
2539
  _vitest.expect.call(void 0, response.status).toBe(200);
2347
2540
  const data = await response.json();
@@ -2355,17 +2548,23 @@ function runActorInspectorTests(driverTestConfig) {
2355
2548
  }
2356
2549
  });
2357
2550
  _vitest.test.skip("should execute database query when database is enabled", async (c) => {
2358
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2551
+ const { client, endpoint } = await setupDriverTest(
2552
+ c,
2553
+ driverTestConfig
2554
+ );
2359
2555
  const handle = await client.counter.create(["test-db-query"]);
2360
2556
  const actorId = await handle.resolve();
2361
- const http = _chunkDUOTOMP7cjs.createActorInspectorClient.call(void 0, `${endpoint}/actors/inspect`, {
2362
- headers: {
2363
- Authorization: `Bearer token`,
2364
- [_chunkPV22ZBDEcjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2365
- getForId: { name: "counter", actorId }
2366
- })
2557
+ const http = _chunkLCQDY73Vcjs.createActorInspectorClient.call(void 0,
2558
+ `${endpoint}/actors/inspect`,
2559
+ {
2560
+ headers: {
2561
+ Authorization: `Bearer token`,
2562
+ [_chunkPELXJCJScjs.HEADER_ACTOR_QUERY]: JSON.stringify({
2563
+ getForId: { name: "counter", actorId }
2564
+ })
2565
+ }
2367
2566
  }
2368
- });
2567
+ );
2369
2568
  const dbInfoResponse = await http.db.$get();
2370
2569
  const dbInfo = await dbInfoResponse.json();
2371
2570
  if (dbInfo.enabled) {
@@ -2529,7 +2728,10 @@ function runActorOnStateChangeTests(driverTestConfig) {
2529
2728
  function runActorReconnectTests(driverTestConfig) {
2530
2729
  _vitest.describe.call(void 0, "Actor Reconnection Tests", () => {
2531
2730
  _vitest.test.call(void 0, "should reconnect and preserve connection state after non-clean disconnect", async (c) => {
2532
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2731
+ const { client, endpoint } = await setupDriverTest(
2732
+ c,
2733
+ driverTestConfig
2734
+ );
2533
2735
  const handle = client.counterConn.getOrCreate(["test-reconnect"]);
2534
2736
  const connection = handle.connect();
2535
2737
  await connection.increment(5);
@@ -2556,7 +2758,9 @@ function runActorReconnectTests(driverTestConfig) {
2556
2758
  });
2557
2759
  _vitest.test.call(void 0, "should not preserve connection state after clean disconnect", async (c) => {
2558
2760
  const { client } = await setupDriverTest(c, driverTestConfig);
2559
- const handle = client.counterConn.getOrCreate(["test-clean-disconnect"]);
2761
+ const handle = client.counterConn.getOrCreate([
2762
+ "test-clean-disconnect"
2763
+ ]);
2560
2764
  const connection = handle.connect();
2561
2765
  await connection.increment(10);
2562
2766
  const connCount1 = await connection.getConnectionCount();
@@ -2564,7 +2768,9 @@ function runActorReconnectTests(driverTestConfig) {
2564
2768
  await connection.dispose();
2565
2769
  await _vitest.vi.waitFor(
2566
2770
  async () => {
2567
- const handle2 = client.counterConn.get(["test-clean-disconnect"]);
2771
+ const handle2 = client.counterConn.get([
2772
+ "test-clean-disconnect"
2773
+ ]);
2568
2774
  const connCount = await handle2.getConnectionCount();
2569
2775
  _vitest.expect.call(void 0, connCount).toBe(1);
2570
2776
  },
@@ -2578,7 +2784,10 @@ function runActorReconnectTests(driverTestConfig) {
2578
2784
  await connection2.dispose();
2579
2785
  });
2580
2786
  _vitest.test.call(void 0, "should handle multiple non-clean disconnects and reconnects", async (c) => {
2581
- const { client, endpoint } = await setupDriverTest(c, driverTestConfig);
2787
+ const { client, endpoint } = await setupDriverTest(
2788
+ c,
2789
+ driverTestConfig
2790
+ );
2582
2791
  const handle = client.counterConn.getOrCreate([
2583
2792
  "test-multiple-reconnect"
2584
2793
  ]);
@@ -2638,8 +2847,12 @@ function runActorVarsTests(driverTestConfig) {
2638
2847
  _vitest.describe.call(void 0, "Deep cloning of static vars", () => {
2639
2848
  _vitest.test.call(void 0, "should deep clone static vars between actor instances", async (c) => {
2640
2849
  const { client } = await setupDriverTest(c, driverTestConfig);
2641
- const instance1 = client.nestedVarActor.getOrCreate(["instance1"]);
2642
- const instance2 = client.nestedVarActor.getOrCreate(["instance2"]);
2850
+ const instance1 = client.nestedVarActor.getOrCreate([
2851
+ "instance1"
2852
+ ]);
2853
+ const instance2 = client.nestedVarActor.getOrCreate([
2854
+ "instance2"
2855
+ ]);
2643
2856
  const modifiedVars = await instance1.modifyNested();
2644
2857
  _vitest.expect.call(void 0, modifiedVars.nested.value).toBe("modified");
2645
2858
  _vitest.expect.call(void 0, modifiedVars.nested.array).toContain(4);
@@ -2693,7 +2906,10 @@ function runManagerDriverTests(driverTestConfig) {
2693
2906
  const counterAAgain = client.counter.getOrCreate();
2694
2907
  const count = await counterAAgain.increment(0);
2695
2908
  _vitest.expect.call(void 0, count).toBe(5);
2696
- const counterB = client.counter.getOrCreate(["counter-b", "testing"]);
2909
+ const counterB = client.counter.getOrCreate([
2910
+ "counter-b",
2911
+ "testing"
2912
+ ]);
2697
2913
  await counterB.increment(10);
2698
2914
  const countB = await counterB.increment(0);
2699
2915
  _vitest.expect.call(void 0, countB).toBe(10);
@@ -2818,7 +3034,9 @@ function runManagerDriverTests(driverTestConfig) {
2818
3034
  ]);
2819
3035
  const subsetMatchCount = await subsetMatchCounter.increment(0);
2820
3036
  _vitest.expect.call(void 0, subsetMatchCount).toBe(0);
2821
- const singleKeyCounter = client.counter.getOrCreate(["counter-match"]);
3037
+ const singleKeyCounter = client.counter.getOrCreate([
3038
+ "counter-match"
3039
+ ]);
2822
3040
  const singleKeyCount = await singleKeyCounter.increment(0);
2823
3041
  _vitest.expect.call(void 0, singleKeyCount).toBe(0);
2824
3042
  });
@@ -2826,7 +3044,9 @@ function runManagerDriverTests(driverTestConfig) {
2826
3044
  const { client } = await setupDriverTest(c, driverTestConfig);
2827
3045
  const stringKeyCounter = client.counter.getOrCreate("string-key-test");
2828
3046
  await stringKeyCounter.increment(7);
2829
- const arrayKeyCounter = client.counter.getOrCreate(["string-key-test"]);
3047
+ const arrayKeyCounter = client.counter.getOrCreate([
3048
+ "string-key-test"
3049
+ ]);
2830
3050
  const count = await arrayKeyCounter.increment(0);
2831
3051
  _vitest.expect.call(void 0, count).toBe(7);
2832
3052
  });
@@ -2954,14 +3174,18 @@ function runRawHttpTests(driverTestConfig) {
2954
3174
  });
2955
3175
  _vitest.test.call(void 0, "should return 404 when no onFetch handler defined", async (c) => {
2956
3176
  const { client } = await setupDriverTest(c, driverTestConfig);
2957
- const actor2 = client.rawHttpNoHandlerActor.getOrCreate(["no-handler"]);
3177
+ const actor2 = client.rawHttpNoHandlerActor.getOrCreate([
3178
+ "no-handler"
3179
+ ]);
2958
3180
  const response = await actor2.fetch("api/anything");
2959
3181
  _vitest.expect.call(void 0, response.ok).toBe(false);
2960
3182
  _vitest.expect.call(void 0, response.status).toBe(404);
2961
3183
  });
2962
3184
  _vitest.test.call(void 0, "should return 500 error when onFetch returns void", async (c) => {
2963
3185
  const { client } = await setupDriverTest(c, driverTestConfig);
2964
- const actor2 = client.rawHttpVoidReturnActor.getOrCreate(["void-return"]);
3186
+ const actor2 = client.rawHttpVoidReturnActor.getOrCreate([
3187
+ "void-return"
3188
+ ]);
2965
3189
  const response = await actor2.fetch("api/anything");
2966
3190
  _vitest.expect.call(void 0, response.ok).toBe(false);
2967
3191
  _vitest.expect.call(void 0, response.status).toBe(500);
@@ -3087,7 +3311,10 @@ function runRawHttpTests(driverTestConfig) {
3087
3311
  const newRequest = new Request(url, {
3088
3312
  method: "GET"
3089
3313
  });
3090
- const response = await actor2.fetch(truncatedPath, newRequest);
3314
+ const response = await actor2.fetch(
3315
+ truncatedPath,
3316
+ newRequest
3317
+ );
3091
3318
  _vitest.expect.call(void 0, response.ok).toBe(true);
3092
3319
  const users = await response.json();
3093
3320
  _vitest.expect.call(void 0, users).toEqual([
@@ -3150,7 +3377,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3150
3377
  _vitest.describe.call(void 0, "raw http request properties", () => {
3151
3378
  _vitest.test.call(void 0, "should pass all Request properties correctly to onFetch", async (c) => {
3152
3379
  const { client } = await setupDriverTest(c, driverTestConfig);
3153
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3380
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3381
+ "test"
3382
+ ]);
3154
3383
  const response = await actor2.fetch("test/path?foo=bar&baz=qux", {
3155
3384
  method: "POST",
3156
3385
  headers: {
@@ -3177,7 +3406,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3177
3406
  });
3178
3407
  _vitest.test.call(void 0, "should handle GET requests with no body", async (c) => {
3179
3408
  const { client } = await setupDriverTest(c, driverTestConfig);
3180
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3409
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3410
+ "test"
3411
+ ]);
3181
3412
  const response = await actor2.fetch("test/get", {
3182
3413
  method: "GET"
3183
3414
  });
@@ -3188,7 +3419,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3188
3419
  });
3189
3420
  _vitest.test.call(void 0, "should handle different content types", async (c) => {
3190
3421
  const { client } = await setupDriverTest(c, driverTestConfig);
3191
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3422
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3423
+ "test"
3424
+ ]);
3192
3425
  const formData = new URLSearchParams();
3193
3426
  formData.append("field1", "value1");
3194
3427
  formData.append("field2", "value2");
@@ -3219,7 +3452,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3219
3452
  });
3220
3453
  _vitest.test.call(void 0, "should preserve all header casing and values", async (c) => {
3221
3454
  const { client } = await setupDriverTest(c, driverTestConfig);
3222
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3455
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3456
+ "test"
3457
+ ]);
3223
3458
  const response = await actor2.fetch("test/headers", {
3224
3459
  headers: {
3225
3460
  Accept: "application/json",
@@ -3239,7 +3474,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3239
3474
  });
3240
3475
  _vitest.test.call(void 0, "should handle empty and special URL paths", async (c) => {
3241
3476
  const { client } = await setupDriverTest(c, driverTestConfig);
3242
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3477
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3478
+ "test"
3479
+ ]);
3243
3480
  const rootResponse = await actor2.fetch("");
3244
3481
  _vitest.expect.call(void 0, rootResponse.ok).toBe(true);
3245
3482
  const rootData = await rootResponse.json();
@@ -3249,7 +3486,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3249
3486
  );
3250
3487
  _vitest.expect.call(void 0, specialResponse.ok).toBe(true);
3251
3488
  const specialData = await specialResponse.json();
3252
- _vitest.expect.call(void 0, specialData.pathname).toMatch(/path.*with.*spaces.*and.*slashes/);
3489
+ _vitest.expect.call(void 0, specialData.pathname).toMatch(
3490
+ /path.*with.*spaces.*and.*slashes/
3491
+ );
3253
3492
  const fragmentResponse = await actor2.fetch("test/path#fragment");
3254
3493
  _vitest.expect.call(void 0, fragmentResponse.ok).toBe(true);
3255
3494
  const fragmentData = await fragmentResponse.json();
@@ -3258,7 +3497,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3258
3497
  });
3259
3498
  _vitest.test.call(void 0, "should handle request properties for all HTTP methods", async (c) => {
3260
3499
  const { client } = await setupDriverTest(c, driverTestConfig);
3261
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3500
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3501
+ "test"
3502
+ ]);
3262
3503
  const methods = [
3263
3504
  "GET",
3264
3505
  "POST",
@@ -3269,11 +3510,14 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3269
3510
  "OPTIONS"
3270
3511
  ];
3271
3512
  for (const method of methods) {
3272
- const response = await actor2.fetch(`test/${method.toLowerCase()}`, {
3273
- method,
3274
- // Only include body for methods that support it
3275
- body: ["POST", "PUT", "PATCH"].includes(method) ? JSON.stringify({ method }) : void 0
3276
- });
3513
+ const response = await actor2.fetch(
3514
+ `test/${method.toLowerCase()}`,
3515
+ {
3516
+ method,
3517
+ // Only include body for methods that support it
3518
+ body: ["POST", "PUT", "PATCH"].includes(method) ? JSON.stringify({ method }) : void 0
3519
+ }
3520
+ );
3277
3521
  if (method === "HEAD") {
3278
3522
  _vitest.expect.call(void 0, response.status).toBe(200);
3279
3523
  const text = await response.text();
@@ -3291,7 +3535,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3291
3535
  });
3292
3536
  _vitest.test.call(void 0, "should handle complex query parameters", async (c) => {
3293
3537
  const { client } = await setupDriverTest(c, driverTestConfig);
3294
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3538
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3539
+ "test"
3540
+ ]);
3295
3541
  const response = await actor2.fetch(
3296
3542
  "test?key=value1&key=value2&array[]=1&array[]=2&nested[prop]=val"
3297
3543
  );
@@ -3303,7 +3549,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3303
3549
  });
3304
3550
  _vitest.test.call(void 0, "should handle multipart form data", async (c) => {
3305
3551
  const { client } = await setupDriverTest(c, driverTestConfig);
3306
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3552
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3553
+ "test"
3554
+ ]);
3307
3555
  const boundary = "----RivetKitBoundary";
3308
3556
  const body = [
3309
3557
  `------${boundary}`,
@@ -3325,13 +3573,17 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3325
3573
  });
3326
3574
  _vitest.expect.call(void 0, response.ok).toBe(true);
3327
3575
  const data = await response.json();
3328
- _vitest.expect.call(void 0, data.headers["content-type"]).toContain("multipart/form-data");
3576
+ _vitest.expect.call(void 0, data.headers["content-type"]).toContain(
3577
+ "multipart/form-data"
3578
+ );
3329
3579
  _vitest.expect.call(void 0, data.bodyText).toContain("field1");
3330
3580
  _vitest.expect.call(void 0, data.bodyText).toContain("value1");
3331
3581
  });
3332
3582
  _vitest.test.call(void 0, "should handle very long URLs", async (c) => {
3333
3583
  const { client } = await setupDriverTest(c, driverTestConfig);
3334
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3584
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3585
+ "test"
3586
+ ]);
3335
3587
  const longValue = "x".repeat(1e3);
3336
3588
  const response = await actor2.fetch(`test/long?param=${longValue}`);
3337
3589
  _vitest.expect.call(void 0, response.ok).toBe(true);
@@ -3341,7 +3593,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3341
3593
  });
3342
3594
  _vitest.test.call(void 0, "should handle large request bodies", async (c) => {
3343
3595
  const { client } = await setupDriverTest(c, driverTestConfig);
3344
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3596
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3597
+ "test"
3598
+ ]);
3345
3599
  const largeArray = new Array(1e4).fill({
3346
3600
  id: 1,
3347
3601
  name: "Test",
@@ -3360,7 +3614,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3360
3614
  });
3361
3615
  _vitest.test.call(void 0, "should handle missing content-type header", async (c) => {
3362
3616
  const { client } = await setupDriverTest(c, driverTestConfig);
3363
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3617
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3618
+ "test"
3619
+ ]);
3364
3620
  const response = await actor2.fetch("test/no-content-type", {
3365
3621
  method: "POST",
3366
3622
  body: "plain text without content-type"
@@ -3371,7 +3627,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3371
3627
  });
3372
3628
  _vitest.test.call(void 0, "should handle empty request body", async (c) => {
3373
3629
  const { client } = await setupDriverTest(c, driverTestConfig);
3374
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3630
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3631
+ "test"
3632
+ ]);
3375
3633
  const response = await actor2.fetch("test/empty", {
3376
3634
  method: "POST",
3377
3635
  headers: {
@@ -3386,7 +3644,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3386
3644
  });
3387
3645
  _vitest.test.call(void 0, "should handle custom HTTP methods", async (c) => {
3388
3646
  const { client } = await setupDriverTest(c, driverTestConfig);
3389
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3647
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3648
+ "test"
3649
+ ]);
3390
3650
  try {
3391
3651
  const response = await actor2.fetch("test/custom", {
3392
3652
  method: "CUSTOM"
@@ -3400,7 +3660,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3400
3660
  });
3401
3661
  _vitest.test.call(void 0, "should handle cookies in headers", async (c) => {
3402
3662
  const { client } = await setupDriverTest(c, driverTestConfig);
3403
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3663
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3664
+ "test"
3665
+ ]);
3404
3666
  const response = await actor2.fetch("test/cookies", {
3405
3667
  headers: {
3406
3668
  Cookie: "session=abc123; user=test; preferences=dark_mode"
@@ -3414,7 +3676,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3414
3676
  });
3415
3677
  _vitest.test.call(void 0, "should handle URL encoding properly", async (c) => {
3416
3678
  const { client } = await setupDriverTest(c, driverTestConfig);
3417
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3679
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3680
+ "test"
3681
+ ]);
3418
3682
  const response = await actor2.fetch(
3419
3683
  "test/encoded?special=%20%21%40%23%24%25%5E%26&unicode=%E2%9C%93&email=test%40example.com"
3420
3684
  );
@@ -3426,7 +3690,9 @@ function runRawHttpRequestPropertiesTests(driverTestConfig) {
3426
3690
  });
3427
3691
  _vitest.test.call(void 0, "should handle concurrent requests maintaining separate contexts", async (c) => {
3428
3692
  const { client } = await setupDriverTest(c, driverTestConfig);
3429
- const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate(["test"]);
3693
+ const actor2 = client.rawHttpRequestPropertiesActor.getOrCreate([
3694
+ "test"
3695
+ ]);
3430
3696
  const requests = [
3431
3697
  actor2.fetch("test/concurrent?id=1", {
3432
3698
  method: "POST",
@@ -3500,7 +3766,9 @@ function runRawWebSocketTests(driverTestConfig) {
3500
3766
  const ws = await actor2.websocket();
3501
3767
  if (ws.readyState !== WebSocket.OPEN) {
3502
3768
  await new Promise((resolve, reject) => {
3503
- ws.addEventListener("open", () => resolve(), { once: true });
3769
+ ws.addEventListener("open", () => resolve(), {
3770
+ once: true
3771
+ });
3504
3772
  ws.addEventListener("close", reject);
3505
3773
  });
3506
3774
  }
@@ -3529,7 +3797,9 @@ function runRawWebSocketTests(driverTestConfig) {
3529
3797
  const ws = await actor2.websocket();
3530
3798
  if (ws.readyState !== WebSocket.OPEN) {
3531
3799
  await new Promise((resolve, reject) => {
3532
- ws.addEventListener("open", () => resolve(), { once: true });
3800
+ ws.addEventListener("open", () => resolve(), {
3801
+ once: true
3802
+ });
3533
3803
  ws.addEventListener("close", reject);
3534
3804
  });
3535
3805
  }
@@ -3556,14 +3826,18 @@ function runRawWebSocketTests(driverTestConfig) {
3556
3826
  const actor1 = client.rawWebSocketActor.getOrCreate(["stats"]);
3557
3827
  const ws1 = await actor1.websocket();
3558
3828
  const ws1MessagePromise = new Promise((resolve, reject) => {
3559
- ws1.addEventListener("message", () => resolve(), { once: true });
3829
+ ws1.addEventListener("message", () => resolve(), {
3830
+ once: true
3831
+ });
3560
3832
  ws1.addEventListener("close", reject);
3561
3833
  });
3562
3834
  await ws1MessagePromise;
3563
3835
  const actor2 = client.rawWebSocketActor.get(["stats"]);
3564
3836
  const ws2 = await actor2.websocket();
3565
3837
  const ws2MessagePromise = new Promise((resolve, reject) => {
3566
- ws2.addEventListener("message", () => resolve(), { once: true });
3838
+ ws2.addEventListener("message", () => resolve(), {
3839
+ once: true
3840
+ });
3567
3841
  ws2.addEventListener("close", reject);
3568
3842
  });
3569
3843
  await Promise.all([ws1MessagePromise, ws2MessagePromise]);
@@ -3601,11 +3875,15 @@ function runRawWebSocketTests(driverTestConfig) {
3601
3875
  });
3602
3876
  _vitest.test.call(void 0, "should handle binary data", async (c) => {
3603
3877
  const { client } = await setupDriverTest(c, driverTestConfig);
3604
- const actor2 = client.rawWebSocketBinaryActor.getOrCreate(["binary"]);
3878
+ const actor2 = client.rawWebSocketBinaryActor.getOrCreate([
3879
+ "binary"
3880
+ ]);
3605
3881
  const ws = await actor2.websocket();
3606
3882
  if (ws.readyState !== WebSocket.OPEN) {
3607
3883
  await new Promise((resolve, reject) => {
3608
- ws.addEventListener("open", () => resolve(), { once: true });
3884
+ ws.addEventListener("open", () => resolve(), {
3885
+ once: true
3886
+ });
3609
3887
  ws.addEventListener("close", reject);
3610
3888
  });
3611
3889
  }
@@ -3636,7 +3914,9 @@ function runRawWebSocketTests(driverTestConfig) {
3636
3914
  ws.send(largeData);
3637
3915
  const largeReversed = await receiveBinaryMessage();
3638
3916
  for (let i = 0; i < largeData.length; i++) {
3639
- _vitest.expect.call(void 0, largeReversed[i]).toBe(largeData[largeData.length - 1 - i]);
3917
+ _vitest.expect.call(void 0, largeReversed[i]).toBe(
3918
+ largeData[largeData.length - 1 - i]
3919
+ );
3640
3920
  }
3641
3921
  ws.close();
3642
3922
  });
@@ -3669,7 +3949,9 @@ function runRawWebSocketTests(driverTestConfig) {
3669
3949
  const ws = await actor2.websocket();
3670
3950
  if (ws.readyState !== WebSocket.OPEN) {
3671
3951
  await new Promise((resolve, reject) => {
3672
- ws.addEventListener("open", () => resolve(), { once: true });
3952
+ ws.addEventListener("open", () => resolve(), {
3953
+ once: true
3954
+ });
3673
3955
  ws.addEventListener("close", reject);
3674
3956
  });
3675
3957
  }
@@ -3692,7 +3974,9 @@ function runRawWebSocketTests(driverTestConfig) {
3692
3974
  });
3693
3975
  _vitest.test.call(void 0, "should properly handle onWebSocket open and close events", async (c) => {
3694
3976
  const { client } = await setupDriverTest(c, driverTestConfig);
3695
- const actor2 = client.rawWebSocketActor.getOrCreate(["open-close-test"]);
3977
+ const actor2 = client.rawWebSocketActor.getOrCreate([
3978
+ "open-close-test"
3979
+ ]);
3696
3980
  const ws1 = await actor2.websocket();
3697
3981
  await new Promise((resolve, reject) => {
3698
3982
  ws1.addEventListener("open", () => resolve(), { once: true });
@@ -3758,8 +4042,12 @@ function runRawWebSocketTests(driverTestConfig) {
3758
4042
  });
3759
4043
  _vitest.test.call(void 0, "should handle query parameters in websocket paths", async (c) => {
3760
4044
  const { client } = await setupDriverTest(c, driverTestConfig);
3761
- const actor2 = client.rawWebSocketActor.getOrCreate(["query-params"]);
3762
- const ws = await actor2.websocket("api/v1/stream?token=abc123&user=test");
4045
+ const actor2 = client.rawWebSocketActor.getOrCreate([
4046
+ "query-params"
4047
+ ]);
4048
+ const ws = await actor2.websocket(
4049
+ "api/v1/stream?token=abc123&user=test"
4050
+ );
3763
4051
  await new Promise((resolve, reject) => {
3764
4052
  ws.addEventListener("open", () => resolve(), { once: true });
3765
4053
  ws.addEventListener("error", reject);
@@ -3789,20 +4077,27 @@ function runRequestAccessTests(driverTestConfig) {
3789
4077
  _vitest.describe.call(void 0, "Request Access in Lifecycle Hooks", () => {
3790
4078
  _vitest.test.call(void 0, "should have access to request object in onBeforeConnect and createConnState", async (c) => {
3791
4079
  const { client } = await setupDriverTest(c, driverTestConfig);
3792
- const handle = client.requestAccessActor.getOrCreate(["test-request"], {
3793
- params: { trackRequest: true }
3794
- });
4080
+ const handle = client.requestAccessActor.getOrCreate(
4081
+ ["test-request"],
4082
+ {
4083
+ params: { trackRequest: true }
4084
+ }
4085
+ );
3795
4086
  const connection = handle.connect();
3796
4087
  const requestInfo = await connection.getRequestInfo();
3797
4088
  if (driverTestConfig.clientType === "http") {
3798
4089
  _vitest.expect.call(void 0, requestInfo.onBeforeConnect.hasRequest).toBe(true);
3799
4090
  _vitest.expect.call(void 0, requestInfo.onBeforeConnect.requestUrl).toBeDefined();
3800
4091
  _vitest.expect.call(void 0, requestInfo.onBeforeConnect.requestMethod).toBeDefined();
3801
- _vitest.expect.call(void 0, requestInfo.onBeforeConnect.requestHeaders).toBeDefined();
4092
+ _vitest.expect.call(void 0,
4093
+ requestInfo.onBeforeConnect.requestHeaders
4094
+ ).toBeDefined();
3802
4095
  _vitest.expect.call(void 0, requestInfo.createConnState.hasRequest).toBe(true);
3803
4096
  _vitest.expect.call(void 0, requestInfo.createConnState.requestUrl).toBeDefined();
3804
4097
  _vitest.expect.call(void 0, requestInfo.createConnState.requestMethod).toBeDefined();
3805
- _vitest.expect.call(void 0, requestInfo.createConnState.requestHeaders).toBeDefined();
4098
+ _vitest.expect.call(void 0,
4099
+ requestInfo.createConnState.requestHeaders
4100
+ ).toBeDefined();
3806
4101
  } else {
3807
4102
  }
3808
4103
  await connection.dispose();
@@ -3833,9 +4128,12 @@ function runRequestAccessTests(driverTestConfig) {
3833
4128
  });
3834
4129
  _vitest.test.call(void 0, "should capture request headers and method", async (c) => {
3835
4130
  const { client } = await setupDriverTest(c, driverTestConfig);
3836
- const handle = client.requestAccessActor.getOrCreate(["test-headers"], {
3837
- params: { trackRequest: true }
3838
- });
4131
+ const handle = client.requestAccessActor.getOrCreate(
4132
+ ["test-headers"],
4133
+ {
4134
+ params: { trackRequest: true }
4135
+ }
4136
+ );
3839
4137
  const connection = handle.connect();
3840
4138
  const requestInfo = await connection.getRequestInfo();
3841
4139
  if (driverTestConfig.clientType === "http") {
@@ -3884,9 +4182,18 @@ function runDriverTests(driverTestConfigPartial) {
3884
4182
  ...driverTestConfig,
3885
4183
  transport
3886
4184
  });
3887
- runActorConnStateTests({ ...driverTestConfig, transport });
3888
- runActorReconnectTests({ ...driverTestConfig, transport });
3889
- runRequestAccessTests({ ...driverTestConfig, transport });
4185
+ runActorConnStateTests({
4186
+ ...driverTestConfig,
4187
+ transport
4188
+ });
4189
+ runActorReconnectTests({
4190
+ ...driverTestConfig,
4191
+ transport
4192
+ });
4193
+ runRequestAccessTests({
4194
+ ...driverTestConfig,
4195
+ transport
4196
+ });
3890
4197
  runActorDriverTestsWithTransport({
3891
4198
  ...driverTestConfig,
3892
4199
  transport
@@ -3933,7 +4240,7 @@ async function createTestRuntime(registryPath, driverFactory) {
3933
4240
  };
3934
4241
  } else {
3935
4242
  let upgradeWebSocket;
3936
- const config = _chunkFYP3TZXDcjs.RunnerConfigSchema.parse({
4243
+ const config = _chunkBIOPK7IBcjs.RunnerConfigSchema.parse({
3937
4244
  driver,
3938
4245
  getUpgradeWebSocket: () => upgradeWebSocket,
3939
4246
  inspector: {
@@ -3942,12 +4249,12 @@ async function createTestRuntime(registryPath, driverFactory) {
3942
4249
  }
3943
4250
  });
3944
4251
  const managerDriver = driver.manager(registry.config, config);
3945
- const client = _chunkJZD6FEOEcjs.createClientWithDriver.call(void 0,
4252
+ const client = _chunkR6XOZKMUcjs.createClientWithDriver.call(void 0,
3946
4253
  managerDriver,
3947
- _chunkFYP3TZXDcjs.ClientConfigSchema.parse({})
4254
+ _chunkBIOPK7IBcjs.ClientConfigSchema.parse({})
3948
4255
  );
3949
- _chunkDUOTOMP7cjs.configureInspectorAccessToken.call(void 0, config, managerDriver);
3950
- const { router } = _chunk2S7HJMMYcjs.createManagerRouter.call(void 0,
4256
+ _chunkLCQDY73Vcjs.configureInspectorAccessToken.call(void 0, config, managerDriver);
4257
+ const { router } = _chunkOAB7ECABcjs.createManagerRouter.call(void 0,
3951
4258
  registry.config,
3952
4259
  config,
3953
4260
  managerDriver,
@@ -3956,7 +4263,7 @@ async function createTestRuntime(registryPath, driverFactory) {
3956
4263
  );
3957
4264
  const nodeWebSocket = _nodews.createNodeWebSocket.call(void 0, { app: router });
3958
4265
  upgradeWebSocket = nodeWebSocket.upgradeWebSocket;
3959
- const port = await _chunk2I6L3VROcjs.getPort.call(void 0, );
4266
+ const port = await _chunkZZYMCYAYcjs.getPort.call(void 0, );
3960
4267
  const server = _nodeserver.serve.call(void 0, {
3961
4268
  fetch: router.fetch,
3962
4269
  hostname: "127.0.0.1",
@@ -3970,7 +4277,9 @@ async function createTestRuntime(registryPath, driverFactory) {
3970
4277
  const serverEndpoint = `http://127.0.0.1:${port}`;
3971
4278
  logger().info({ msg: "test serer listening", port });
3972
4279
  const cleanup = async () => {
3973
- await new Promise((resolve) => server.close(() => resolve(void 0)));
4280
+ await new Promise(
4281
+ (resolve) => server.close(() => resolve(void 0))
4282
+ );
3974
4283
  await (driverCleanup == null ? void 0 : driverCleanup());
3975
4284
  };
3976
4285
  return {