@replit/river 0.10.6 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SCULZ4KS.js → chunk-3JGVFWKQ.js} +1 -1
- package/dist/{chunk-XWRKNZSC.js → chunk-3MQETIGZ.js} +1 -1
- package/dist/{chunk-5735JCTZ.js → chunk-6QJETGOD.js} +3 -3
- package/dist/{chunk-KRYKORQT.js → chunk-L7D75G4K.js} +1 -1
- package/dist/{chunk-MF3Z3IDF.js → chunk-LQXPKF3A.js} +4 -4
- package/dist/{chunk-LRQGTUTI.js → chunk-PJ2EUO7O.js} +3 -3
- package/dist/{chunk-SLUSVGQH.js → chunk-T7M7OKPE.js} +3 -0
- package/dist/logging/index.cjs +3 -0
- package/dist/logging/index.d.cts +1 -0
- package/dist/logging/index.d.ts +1 -0
- package/dist/logging/index.js +1 -1
- package/dist/router/index.js +2 -2
- package/dist/transport/impls/stdio/stdio.cjs +3 -3
- package/dist/transport/impls/stdio/stdio.js +3 -3
- package/dist/transport/impls/unixsocket/client.cjs +3 -3
- package/dist/transport/impls/unixsocket/client.js +3 -3
- package/dist/transport/impls/unixsocket/server.cjs +3 -3
- package/dist/transport/impls/unixsocket/server.js +3 -3
- package/dist/transport/impls/ws/client.cjs +3 -3
- package/dist/transport/impls/ws/client.js +4 -4
- package/dist/transport/impls/ws/server.cjs +3 -3
- package/dist/transport/impls/ws/server.js +4 -4
- package/dist/transport/index.cjs +3 -3
- package/dist/transport/index.js +2 -2
- package/dist/util/testHelpers.cjs +3 -3
- package/dist/util/testHelpers.js +6 -6
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WebSocketConnection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L7D75G4K.js";
|
|
4
4
|
import {
|
|
5
5
|
NaiveJsonCodec
|
|
6
6
|
} from "./chunk-R6H2BIMC.js";
|
|
7
7
|
import {
|
|
8
8
|
Transport
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LQXPKF3A.js";
|
|
10
10
|
import {
|
|
11
11
|
log
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-T7M7OKPE.js";
|
|
13
13
|
|
|
14
14
|
// transport/impls/ws/client.ts
|
|
15
15
|
var defaultOptions = {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-ZE4MX7DF.js";
|
|
7
7
|
import {
|
|
8
8
|
log
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-T7M7OKPE.js";
|
|
10
10
|
|
|
11
11
|
// transport/transport.ts
|
|
12
12
|
import { Value } from "@sinclair/typebox/value";
|
|
@@ -178,12 +178,12 @@ var Transport = class {
|
|
|
178
178
|
return;
|
|
179
179
|
}
|
|
180
180
|
if (isAck(msg.controlFlags) && Value.Check(TransportAckSchema, msg)) {
|
|
181
|
-
log?.
|
|
181
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg)}`);
|
|
182
182
|
if (this.sendBuffer.has(msg.payload.ack)) {
|
|
183
183
|
this.sendBuffer.delete(msg.payload.ack);
|
|
184
184
|
}
|
|
185
185
|
} else {
|
|
186
|
-
log?.
|
|
186
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg)}`);
|
|
187
187
|
this.eventDispatcher.dispatchEvent("message", msg);
|
|
188
188
|
if (!isAck(msg.controlFlags)) {
|
|
189
189
|
const ackMsg = reply(msg, { ack: msg.id });
|
|
@@ -233,7 +233,7 @@ var Transport = class {
|
|
|
233
233
|
this.sendBuffer.set(msg.id, msg);
|
|
234
234
|
}
|
|
235
235
|
if (conn) {
|
|
236
|
-
log?.
|
|
236
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg)}`);
|
|
237
237
|
const ok = conn.send(this.codec.toBuffer(msg));
|
|
238
238
|
if (ok) {
|
|
239
239
|
return msg.id;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WebSocketConnection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L7D75G4K.js";
|
|
4
4
|
import {
|
|
5
5
|
NaiveJsonCodec
|
|
6
6
|
} from "./chunk-R6H2BIMC.js";
|
|
7
7
|
import {
|
|
8
8
|
Transport
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LQXPKF3A.js";
|
|
10
10
|
import {
|
|
11
11
|
log
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-T7M7OKPE.js";
|
|
13
13
|
|
|
14
14
|
// transport/impls/ws/server.ts
|
|
15
15
|
var defaultOptions = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// logging/index.ts
|
|
2
2
|
var LoggingLevels = {
|
|
3
|
+
debug: -1,
|
|
3
4
|
info: 0,
|
|
4
5
|
warn: 1,
|
|
5
6
|
error: 2
|
|
@@ -7,10 +8,12 @@ var LoggingLevels = {
|
|
|
7
8
|
var log;
|
|
8
9
|
var defaultLoggingLevel = "warn";
|
|
9
10
|
function bindLogger(write, color) {
|
|
11
|
+
const debug = color ? "\x1B[37mdebug\x1B[0m" : "debug";
|
|
10
12
|
const info = color ? "\x1B[37minfo\x1B[0m" : "info";
|
|
11
13
|
const warn = color ? "\x1B[33mwarn\x1B[0m" : "warn";
|
|
12
14
|
const error = color ? "\x1B[31merr\x1B[0m" : "err";
|
|
13
15
|
log = {
|
|
16
|
+
debug: (msg) => log && LoggingLevels[log.minLevel] <= -1 && write(`[river:${debug}] ${msg}`),
|
|
14
17
|
info: (msg) => log && LoggingLevels[log.minLevel] <= 0 && write(`[river:${info}] ${msg}`),
|
|
15
18
|
warn: (msg) => log && LoggingLevels[log.minLevel] <= 1 && write(`[river:${warn}] ${msg}`),
|
|
16
19
|
error: (msg) => log && LoggingLevels[log.minLevel] <= 2 && write(`[river:${error}] ${msg}`),
|
package/dist/logging/index.cjs
CHANGED
|
@@ -26,6 +26,7 @@ __export(logging_exports, {
|
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(logging_exports);
|
|
28
28
|
var LoggingLevels = {
|
|
29
|
+
debug: -1,
|
|
29
30
|
info: 0,
|
|
30
31
|
warn: 1,
|
|
31
32
|
error: 2
|
|
@@ -33,10 +34,12 @@ var LoggingLevels = {
|
|
|
33
34
|
var log;
|
|
34
35
|
var defaultLoggingLevel = "warn";
|
|
35
36
|
function bindLogger(write, color) {
|
|
37
|
+
const debug = color ? "\x1B[37mdebug\x1B[0m" : "debug";
|
|
36
38
|
const info = color ? "\x1B[37minfo\x1B[0m" : "info";
|
|
37
39
|
const warn = color ? "\x1B[33mwarn\x1B[0m" : "warn";
|
|
38
40
|
const error = color ? "\x1B[31merr\x1B[0m" : "err";
|
|
39
41
|
log = {
|
|
42
|
+
debug: (msg) => log && LoggingLevels[log.minLevel] <= -1 && write(`[river:${debug}] ${msg}`),
|
|
40
43
|
info: (msg) => log && LoggingLevels[log.minLevel] <= 0 && write(`[river:${info}] ${msg}`),
|
|
41
44
|
warn: (msg) => log && LoggingLevels[log.minLevel] <= 1 && write(`[river:${warn}] ${msg}`),
|
|
42
45
|
error: (msg) => log && LoggingLevels[log.minLevel] <= 2 && write(`[river:${error}] ${msg}`),
|
package/dist/logging/index.d.cts
CHANGED
package/dist/logging/index.d.ts
CHANGED
package/dist/logging/index.js
CHANGED
package/dist/router/index.js
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
createClient,
|
|
9
9
|
createServer,
|
|
10
10
|
serializeService
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-3JGVFWKQ.js";
|
|
12
12
|
import "../chunk-ZE4MX7DF.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-T7M7OKPE.js";
|
|
14
14
|
export {
|
|
15
15
|
Err,
|
|
16
16
|
Ok,
|
|
@@ -335,12 +335,12 @@ var Transport = class {
|
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
337
|
if (isAck(msg.controlFlags) && import_value.Value.Check(TransportAckSchema, msg)) {
|
|
338
|
-
log?.
|
|
338
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg)}`);
|
|
339
339
|
if (this.sendBuffer.has(msg.payload.ack)) {
|
|
340
340
|
this.sendBuffer.delete(msg.payload.ack);
|
|
341
341
|
}
|
|
342
342
|
} else {
|
|
343
|
-
log?.
|
|
343
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg)}`);
|
|
344
344
|
this.eventDispatcher.dispatchEvent("message", msg);
|
|
345
345
|
if (!isAck(msg.controlFlags)) {
|
|
346
346
|
const ackMsg = reply(msg, { ack: msg.id });
|
|
@@ -390,7 +390,7 @@ var Transport = class {
|
|
|
390
390
|
this.sendBuffer.set(msg.id, msg);
|
|
391
391
|
}
|
|
392
392
|
if (conn) {
|
|
393
|
-
log?.
|
|
393
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg)}`);
|
|
394
394
|
const ok = conn.send(this.codec.toBuffer(msg));
|
|
395
395
|
if (ok) {
|
|
396
396
|
return msg.id;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StreamConnection,
|
|
3
3
|
createDelimitedStream
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-3MQETIGZ.js";
|
|
5
5
|
import "../../../chunk-ORAG7IAU.js";
|
|
6
6
|
import {
|
|
7
7
|
NaiveJsonCodec
|
|
8
8
|
} from "../../../chunk-R6H2BIMC.js";
|
|
9
9
|
import {
|
|
10
10
|
Transport
|
|
11
|
-
} from "../../../chunk-
|
|
11
|
+
} from "../../../chunk-LQXPKF3A.js";
|
|
12
12
|
import "../../../chunk-ZE4MX7DF.js";
|
|
13
13
|
import {
|
|
14
14
|
log
|
|
15
|
-
} from "../../../chunk-
|
|
15
|
+
} from "../../../chunk-T7M7OKPE.js";
|
|
16
16
|
|
|
17
17
|
// transport/impls/stdio/stdio.ts
|
|
18
18
|
var defaultOptions = {
|
|
@@ -235,12 +235,12 @@ var Transport = class {
|
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
237
|
if (isAck(msg.controlFlags) && import_value.Value.Check(TransportAckSchema, msg)) {
|
|
238
|
-
log?.
|
|
238
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg)}`);
|
|
239
239
|
if (this.sendBuffer.has(msg.payload.ack)) {
|
|
240
240
|
this.sendBuffer.delete(msg.payload.ack);
|
|
241
241
|
}
|
|
242
242
|
} else {
|
|
243
|
-
log?.
|
|
243
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg)}`);
|
|
244
244
|
this.eventDispatcher.dispatchEvent("message", msg);
|
|
245
245
|
if (!isAck(msg.controlFlags)) {
|
|
246
246
|
const ackMsg = reply(msg, { ack: msg.id });
|
|
@@ -290,7 +290,7 @@ var Transport = class {
|
|
|
290
290
|
this.sendBuffer.set(msg.id, msg);
|
|
291
291
|
}
|
|
292
292
|
if (conn) {
|
|
293
|
-
log?.
|
|
293
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg)}`);
|
|
294
294
|
const ok = conn.send(this.codec.toBuffer(msg));
|
|
295
295
|
if (ok) {
|
|
296
296
|
return msg.id;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StreamConnection,
|
|
3
3
|
createDelimitedStream
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-3MQETIGZ.js";
|
|
5
5
|
import "../../../chunk-ORAG7IAU.js";
|
|
6
6
|
import "../../../chunk-WVT5QXMZ.js";
|
|
7
7
|
import {
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "../../../chunk-R6H2BIMC.js";
|
|
10
10
|
import {
|
|
11
11
|
Transport
|
|
12
|
-
} from "../../../chunk-
|
|
12
|
+
} from "../../../chunk-LQXPKF3A.js";
|
|
13
13
|
import "../../../chunk-ZE4MX7DF.js";
|
|
14
14
|
import {
|
|
15
15
|
log
|
|
16
|
-
} from "../../../chunk-
|
|
16
|
+
} from "../../../chunk-T7M7OKPE.js";
|
|
17
17
|
|
|
18
18
|
// transport/impls/unixsocket/client.ts
|
|
19
19
|
import { createConnection } from "node:net";
|
|
@@ -235,12 +235,12 @@ var Transport = class {
|
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
237
|
if (isAck(msg.controlFlags) && import_value.Value.Check(TransportAckSchema, msg)) {
|
|
238
|
-
log?.
|
|
238
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg)}`);
|
|
239
239
|
if (this.sendBuffer.has(msg.payload.ack)) {
|
|
240
240
|
this.sendBuffer.delete(msg.payload.ack);
|
|
241
241
|
}
|
|
242
242
|
} else {
|
|
243
|
-
log?.
|
|
243
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg)}`);
|
|
244
244
|
this.eventDispatcher.dispatchEvent("message", msg);
|
|
245
245
|
if (!isAck(msg.controlFlags)) {
|
|
246
246
|
const ackMsg = reply(msg, { ack: msg.id });
|
|
@@ -290,7 +290,7 @@ var Transport = class {
|
|
|
290
290
|
this.sendBuffer.set(msg.id, msg);
|
|
291
291
|
}
|
|
292
292
|
if (conn) {
|
|
293
|
-
log?.
|
|
293
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg)}`);
|
|
294
294
|
const ok = conn.send(this.codec.toBuffer(msg));
|
|
295
295
|
if (ok) {
|
|
296
296
|
return msg.id;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StreamConnection,
|
|
3
3
|
createDelimitedStream
|
|
4
|
-
} from "../../../chunk-
|
|
4
|
+
} from "../../../chunk-3MQETIGZ.js";
|
|
5
5
|
import "../../../chunk-ORAG7IAU.js";
|
|
6
6
|
import "../../../chunk-WVT5QXMZ.js";
|
|
7
7
|
import {
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
} from "../../../chunk-R6H2BIMC.js";
|
|
10
10
|
import {
|
|
11
11
|
Transport
|
|
12
|
-
} from "../../../chunk-
|
|
12
|
+
} from "../../../chunk-LQXPKF3A.js";
|
|
13
13
|
import "../../../chunk-ZE4MX7DF.js";
|
|
14
14
|
import {
|
|
15
15
|
log
|
|
16
|
-
} from "../../../chunk-
|
|
16
|
+
} from "../../../chunk-T7M7OKPE.js";
|
|
17
17
|
|
|
18
18
|
// transport/impls/unixsocket/server.ts
|
|
19
19
|
var defaultOptions = {
|
|
@@ -235,12 +235,12 @@ var Transport = class {
|
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
237
|
if (isAck(msg.controlFlags) && import_value.Value.Check(TransportAckSchema, msg)) {
|
|
238
|
-
log?.
|
|
238
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg)}`);
|
|
239
239
|
if (this.sendBuffer.has(msg.payload.ack)) {
|
|
240
240
|
this.sendBuffer.delete(msg.payload.ack);
|
|
241
241
|
}
|
|
242
242
|
} else {
|
|
243
|
-
log?.
|
|
243
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg)}`);
|
|
244
244
|
this.eventDispatcher.dispatchEvent("message", msg);
|
|
245
245
|
if (!isAck(msg.controlFlags)) {
|
|
246
246
|
const ackMsg = reply(msg, { ack: msg.id });
|
|
@@ -290,7 +290,7 @@ var Transport = class {
|
|
|
290
290
|
this.sendBuffer.set(msg.id, msg);
|
|
291
291
|
}
|
|
292
292
|
if (conn) {
|
|
293
|
-
log?.
|
|
293
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg)}`);
|
|
294
294
|
const ok = conn.send(this.codec.toBuffer(msg));
|
|
295
295
|
if (ok) {
|
|
296
296
|
return msg.id;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WebSocketClientTransport
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-6QJETGOD.js";
|
|
4
|
+
import "../../../chunk-L7D75G4K.js";
|
|
5
5
|
import "../../../chunk-R6H2BIMC.js";
|
|
6
|
-
import "../../../chunk-
|
|
6
|
+
import "../../../chunk-LQXPKF3A.js";
|
|
7
7
|
import "../../../chunk-ZE4MX7DF.js";
|
|
8
|
-
import "../../../chunk-
|
|
8
|
+
import "../../../chunk-T7M7OKPE.js";
|
|
9
9
|
export {
|
|
10
10
|
WebSocketClientTransport
|
|
11
11
|
};
|
|
@@ -281,12 +281,12 @@ var Transport = class {
|
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
283
|
if (isAck(msg.controlFlags) && import_value.Value.Check(TransportAckSchema, msg)) {
|
|
284
|
-
log?.
|
|
284
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg)}`);
|
|
285
285
|
if (this.sendBuffer.has(msg.payload.ack)) {
|
|
286
286
|
this.sendBuffer.delete(msg.payload.ack);
|
|
287
287
|
}
|
|
288
288
|
} else {
|
|
289
|
-
log?.
|
|
289
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg)}`);
|
|
290
290
|
this.eventDispatcher.dispatchEvent("message", msg);
|
|
291
291
|
if (!isAck(msg.controlFlags)) {
|
|
292
292
|
const ackMsg = reply(msg, { ack: msg.id });
|
|
@@ -336,7 +336,7 @@ var Transport = class {
|
|
|
336
336
|
this.sendBuffer.set(msg.id, msg);
|
|
337
337
|
}
|
|
338
338
|
if (conn) {
|
|
339
|
-
log?.
|
|
339
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg)}`);
|
|
340
340
|
const ok = conn.send(this.codec.toBuffer(msg));
|
|
341
341
|
if (ok) {
|
|
342
342
|
return msg.id;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
WebSocketServerTransport
|
|
3
|
-
} from "../../../chunk-
|
|
4
|
-
import "../../../chunk-
|
|
3
|
+
} from "../../../chunk-PJ2EUO7O.js";
|
|
4
|
+
import "../../../chunk-L7D75G4K.js";
|
|
5
5
|
import "../../../chunk-WVT5QXMZ.js";
|
|
6
6
|
import "../../../chunk-R6H2BIMC.js";
|
|
7
|
-
import "../../../chunk-
|
|
7
|
+
import "../../../chunk-LQXPKF3A.js";
|
|
8
8
|
import "../../../chunk-ZE4MX7DF.js";
|
|
9
|
-
import "../../../chunk-
|
|
9
|
+
import "../../../chunk-T7M7OKPE.js";
|
|
10
10
|
export {
|
|
11
11
|
WebSocketServerTransport
|
|
12
12
|
};
|
package/dist/transport/index.cjs
CHANGED
|
@@ -252,12 +252,12 @@ var Transport = class {
|
|
|
252
252
|
return;
|
|
253
253
|
}
|
|
254
254
|
if (isAck(msg2.controlFlags) && import_value.Value.Check(TransportAckSchema, msg2)) {
|
|
255
|
-
log?.
|
|
255
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg2)}`);
|
|
256
256
|
if (this.sendBuffer.has(msg2.payload.ack)) {
|
|
257
257
|
this.sendBuffer.delete(msg2.payload.ack);
|
|
258
258
|
}
|
|
259
259
|
} else {
|
|
260
|
-
log?.
|
|
260
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg2)}`);
|
|
261
261
|
this.eventDispatcher.dispatchEvent("message", msg2);
|
|
262
262
|
if (!isAck(msg2.controlFlags)) {
|
|
263
263
|
const ackMsg = reply(msg2, { ack: msg2.id });
|
|
@@ -307,7 +307,7 @@ var Transport = class {
|
|
|
307
307
|
this.sendBuffer.set(msg2.id, msg2);
|
|
308
308
|
}
|
|
309
309
|
if (conn) {
|
|
310
|
-
log?.
|
|
310
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg2)}`);
|
|
311
311
|
const ok = conn.send(this.codec.toBuffer(msg2));
|
|
312
312
|
if (ok) {
|
|
313
313
|
return msg2.id;
|
package/dist/transport/index.js
CHANGED
|
@@ -2,14 +2,14 @@ import "../chunk-ORAG7IAU.js";
|
|
|
2
2
|
import {
|
|
3
3
|
Connection,
|
|
4
4
|
Transport
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-LQXPKF3A.js";
|
|
6
6
|
import {
|
|
7
7
|
OpaqueTransportMessageSchema,
|
|
8
8
|
TransportMessageSchema,
|
|
9
9
|
msg,
|
|
10
10
|
reply
|
|
11
11
|
} from "../chunk-ZE4MX7DF.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-T7M7OKPE.js";
|
|
13
13
|
export {
|
|
14
14
|
Connection,
|
|
15
15
|
OpaqueTransportMessageSchema,
|
|
@@ -272,12 +272,12 @@ var Transport = class {
|
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
274
|
if (isAck(msg2.controlFlags) && import_value.Value.Check(TransportAckSchema, msg2)) {
|
|
275
|
-
log?.
|
|
275
|
+
log?.debug(`${this.clientId} -- received ack: ${JSON.stringify(msg2)}`);
|
|
276
276
|
if (this.sendBuffer.has(msg2.payload.ack)) {
|
|
277
277
|
this.sendBuffer.delete(msg2.payload.ack);
|
|
278
278
|
}
|
|
279
279
|
} else {
|
|
280
|
-
log?.
|
|
280
|
+
log?.debug(`${this.clientId} -- received msg: ${JSON.stringify(msg2)}`);
|
|
281
281
|
this.eventDispatcher.dispatchEvent("message", msg2);
|
|
282
282
|
if (!isAck(msg2.controlFlags)) {
|
|
283
283
|
const ackMsg = reply(msg2, { ack: msg2.id });
|
|
@@ -327,7 +327,7 @@ var Transport = class {
|
|
|
327
327
|
this.sendBuffer.set(msg2.id, msg2);
|
|
328
328
|
}
|
|
329
329
|
if (conn) {
|
|
330
|
-
log?.
|
|
330
|
+
log?.debug(`${this.clientId} -- sending ${JSON.stringify(msg2)}`);
|
|
331
331
|
const ok = conn.send(this.codec.toBuffer(msg2));
|
|
332
332
|
if (ok) {
|
|
333
333
|
return msg2.id;
|
package/dist/util/testHelpers.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UNCAUGHT_ERROR,
|
|
3
3
|
pushable
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3JGVFWKQ.js";
|
|
5
5
|
import {
|
|
6
6
|
WebSocketClientTransport
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-6QJETGOD.js";
|
|
8
8
|
import {
|
|
9
9
|
WebSocketServerTransport
|
|
10
|
-
} from "../chunk-
|
|
11
|
-
import "../chunk-
|
|
10
|
+
} from "../chunk-PJ2EUO7O.js";
|
|
11
|
+
import "../chunk-L7D75G4K.js";
|
|
12
12
|
import "../chunk-ORAG7IAU.js";
|
|
13
13
|
import "../chunk-WVT5QXMZ.js";
|
|
14
14
|
import "../chunk-R6H2BIMC.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-LQXPKF3A.js";
|
|
16
16
|
import {
|
|
17
17
|
msg
|
|
18
18
|
} from "../chunk-ZE4MX7DF.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-T7M7OKPE.js";
|
|
20
20
|
|
|
21
21
|
// util/testHelpers.ts
|
|
22
22
|
import WebSocket from "isomorphic-ws";
|
package/package.json
CHANGED