@replit/river 0.205.2 → 0.206.0
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-TP4OJAKI.js → chunk-EMOYAUX3.js} +3 -3
- package/dist/{chunk-W337YQLT.js → chunk-FCQWZRES.js} +3 -3
- package/dist/{chunk-FTOB2HQN.js → chunk-JSU537MZ.js} +2 -2
- package/dist/{chunk-BYA34LH3.js → chunk-NTVJNU5K.js} +14 -18
- package/dist/chunk-NTVJNU5K.js.map +1 -0
- package/dist/{chunk-FCN2JPOE.js → chunk-VGWFMCOP.js} +2 -2
- package/dist/{connection-8ed39cb5.d.ts → connection-494a5b68.d.ts} +2 -2
- package/dist/logging/index.d.cts +1 -1
- package/dist/logging/index.d.ts +1 -1
- package/dist/{message-865bba35.d.ts → message-ffacb98a.d.ts} +1 -1
- package/dist/router/index.cjs +13 -17
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +5 -8
- package/dist/router/index.d.ts +5 -8
- package/dist/router/index.js +1 -1
- package/dist/{services-036dcc97.d.ts → services-15a0df95.d.ts} +731 -9
- package/dist/testUtil/index.cjs +1 -1
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +3 -5
- package/dist/testUtil/index.d.ts +3 -5
- package/dist/testUtil/index.js +4 -4
- package/dist/transport/impls/ws/client.cjs +1 -1
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +3 -4
- package/dist/transport/impls/ws/client.d.ts +3 -4
- package/dist/transport/impls/ws/client.js +4 -4
- package/dist/transport/impls/ws/server.cjs +1 -1
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +4 -4
- package/dist/transport/impls/ws/server.d.ts +4 -4
- package/dist/transport/impls/ws/server.js +4 -4
- package/dist/transport/index.cjs +1 -1
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +72 -5
- package/dist/transport/index.d.ts +72 -5
- package/dist/transport/index.js +4 -4
- package/package.json +1 -1
- package/dist/chunk-BYA34LH3.js.map +0 -1
- package/dist/client-8ab60722.d.ts +0 -54
- package/dist/context-2c4bb66b.d.ts +0 -670
- package/dist/server-dc261419.d.ts +0 -70
- /package/dist/{chunk-TP4OJAKI.js.map → chunk-EMOYAUX3.js.map} +0 -0
- /package/dist/{chunk-W337YQLT.js.map → chunk-FCQWZRES.js.map} +0 -0
- /package/dist/{chunk-FTOB2HQN.js.map → chunk-JSU537MZ.js.map} +0 -0
- /package/dist/{chunk-FCN2JPOE.js.map → chunk-VGWFMCOP.js.map} +0 -0
package/dist/router/index.cjs
CHANGED
|
@@ -69,6 +69,10 @@ function castTypeboxValueErrors(errors) {
|
|
|
69
69
|
}
|
|
70
70
|
return result;
|
|
71
71
|
}
|
|
72
|
+
var CancelResultSchema = import_typebox.Type.Object({
|
|
73
|
+
code: import_typebox.Type.Literal(CANCEL_CODE),
|
|
74
|
+
message: import_typebox.Type.String()
|
|
75
|
+
});
|
|
72
76
|
var ReaderErrorSchema = import_typebox.Type.Union([
|
|
73
77
|
import_typebox.Type.Object({
|
|
74
78
|
code: import_typebox.Type.Literal(UNCAUGHT_ERROR_CODE),
|
|
@@ -88,10 +92,7 @@ var ReaderErrorSchema = import_typebox.Type.Union([
|
|
|
88
92
|
})
|
|
89
93
|
)
|
|
90
94
|
}),
|
|
91
|
-
|
|
92
|
-
code: import_typebox.Type.Literal(CANCEL_CODE),
|
|
93
|
-
message: import_typebox.Type.String()
|
|
94
|
-
})
|
|
95
|
+
CancelResultSchema
|
|
95
96
|
]);
|
|
96
97
|
function isUnion(schema) {
|
|
97
98
|
return schema[import_typebox.Kind] === "Union";
|
|
@@ -1184,7 +1185,6 @@ async function getSingleMessage(resReadable, log) {
|
|
|
1184
1185
|
}
|
|
1185
1186
|
|
|
1186
1187
|
// router/server.ts
|
|
1187
|
-
var import_typebox6 = require("@sinclair/typebox");
|
|
1188
1188
|
var import_value2 = require("@sinclair/typebox/value");
|
|
1189
1189
|
|
|
1190
1190
|
// transport/stringifyError.ts
|
|
@@ -1196,12 +1196,6 @@ function coerceErrorString(err) {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
1198
|
// router/server.ts
|
|
1199
|
-
var CancelResultSchema = ErrResultSchema(
|
|
1200
|
-
import_typebox6.Type.Object({
|
|
1201
|
-
code: import_typebox6.Type.Literal(CANCEL_CODE),
|
|
1202
|
-
message: import_typebox6.Type.String()
|
|
1203
|
-
})
|
|
1204
|
-
);
|
|
1205
1199
|
var RiverServer = class {
|
|
1206
1200
|
transport;
|
|
1207
1201
|
contextMap;
|
|
@@ -1343,7 +1337,7 @@ var RiverServer = class {
|
|
|
1343
1337
|
if (isStreamCancelBackwardsCompat(msg.controlFlags, protocolVersion)) {
|
|
1344
1338
|
let cancelResult;
|
|
1345
1339
|
if (import_value2.Value.Check(CancelResultSchema, msg.payload)) {
|
|
1346
|
-
cancelResult = msg.payload;
|
|
1340
|
+
cancelResult = Err(msg.payload);
|
|
1347
1341
|
} else {
|
|
1348
1342
|
cancelResult = Err({
|
|
1349
1343
|
code: CANCEL_CODE,
|
|
@@ -1545,11 +1539,13 @@ var RiverServer = class {
|
|
|
1545
1539
|
sessionId,
|
|
1546
1540
|
metadata: sessionMetadata,
|
|
1547
1541
|
span: span2,
|
|
1548
|
-
cancel: () => {
|
|
1549
|
-
|
|
1542
|
+
cancel: (message) => {
|
|
1543
|
+
const errRes = {
|
|
1550
1544
|
code: CANCEL_CODE,
|
|
1551
|
-
message: "cancelled by server procedure handler"
|
|
1552
|
-
}
|
|
1545
|
+
message: message ?? "cancelled by server procedure handler"
|
|
1546
|
+
};
|
|
1547
|
+
onServerCancel(errRes);
|
|
1548
|
+
return Err(errRes);
|
|
1553
1549
|
},
|
|
1554
1550
|
signal: finishedController.signal
|
|
1555
1551
|
});
|
|
@@ -1886,7 +1882,7 @@ function createServerHandshakeOptions(schema, validate) {
|
|
|
1886
1882
|
}
|
|
1887
1883
|
|
|
1888
1884
|
// package.json
|
|
1889
|
-
var version = "0.
|
|
1885
|
+
var version = "0.206.0";
|
|
1890
1886
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1891
1887
|
0 && (module.exports = {
|
|
1892
1888
|
CANCEL_CODE,
|