@replit/river 0.208.0 → 0.208.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.
- package/dist/{adapter-ChksXKVN.d.ts → adapter-f2b6e211.d.ts} +2 -2
- package/dist/{chunk-2JNVDUMN.js → chunk-2WFRHXDZ.js} +17 -12
- package/dist/chunk-2WFRHXDZ.js.map +1 -0
- package/dist/{chunk-DKW3GC3M.js → chunk-BXKBENJE.js} +2 -2
- package/dist/{chunk-ETZAHFGQ.js → chunk-EVAQ2QMB.js} +25 -21
- package/dist/{chunk-ETZAHFGQ.js.map → chunk-EVAQ2QMB.js.map} +1 -1
- package/dist/codec/index.cjs +1 -1
- package/dist/codec/index.cjs.map +1 -1
- package/dist/codec/index.d.cts +3 -3
- package/dist/codec/index.d.ts +3 -3
- package/dist/codec/index.js +2 -2
- package/dist/{connection-Donr3JRB.d.ts → connection-098d4aad.d.ts} +4 -4
- package/dist/{index-D8IOd3LG.d.ts → index-02554794.d.ts} +2 -2
- package/dist/logging/index.d.cts +2 -2
- package/dist/logging/index.d.ts +2 -2
- package/dist/{message-Di94OL80.d.cts → message-01c3e85a.d.ts} +1 -1
- package/dist/router/index.cjs +9 -5
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +7 -7
- package/dist/router/index.d.ts +7 -7
- package/dist/router/index.js +1 -1
- package/dist/{transport-CZb3vdB4.d.ts → services-44be1b6b.d.ts} +275 -275
- package/dist/testUtil/index.cjs +14 -8
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +5 -5
- package/dist/testUtil/index.d.ts +5 -5
- package/dist/testUtil/index.js +5 -4
- package/dist/testUtil/index.js.map +1 -1
- package/dist/transport/impls/ws/client.cjs +10 -6
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +6 -6
- package/dist/transport/impls/ws/client.d.ts +6 -6
- package/dist/transport/impls/ws/client.js +3 -3
- package/dist/transport/impls/ws/server.cjs +12 -7
- package/dist/transport/impls/ws/server.cjs.map +1 -1
- package/dist/transport/impls/ws/server.d.cts +6 -6
- package/dist/transport/impls/ws/server.d.ts +6 -6
- package/dist/transport/impls/ws/server.js +3 -3
- package/dist/transport/index.cjs +12 -7
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +6 -6
- package/dist/transport/index.d.ts +6 -6
- package/dist/transport/index.js +3 -3
- package/dist/{wslike-Dng9H1C7.d.ts → wslike-e0b32dd5.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/adapter-Cuc4JtfV.d.cts +0 -46
- package/dist/chunk-2JNVDUMN.js.map +0 -1
- package/dist/connection-BF4zg6Qv.d.cts +0 -35
- package/dist/index-C9tpZjBN.d.cts +0 -37
- package/dist/message-Di94OL80.d.ts +0 -108
- package/dist/transport-CCaWx1Rb.d.cts +0 -1566
- package/dist/wslike-Dng9H1C7.d.cts +0 -40
- /package/dist/{chunk-DKW3GC3M.js.map → chunk-BXKBENJE.js.map} +0 -0
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
|
-
import { TSchema } from '@sinclair/typebox';
|
|
3
|
-
import { Span, Context } from '@opentelemetry/api';
|
|
4
|
-
|
|
5
|
-
interface PropagationContext {
|
|
6
|
-
traceparent: string;
|
|
7
|
-
tracestate: string;
|
|
8
|
-
}
|
|
9
|
-
interface TelemetryInfo {
|
|
10
|
-
span: Span;
|
|
11
|
-
ctx: Context;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Generic Typebox schema for a transport message.
|
|
16
|
-
* @template T The type of the payload.
|
|
17
|
-
* @param {T} t The payload schema.
|
|
18
|
-
* @returns The transport message schema.
|
|
19
|
-
*/
|
|
20
|
-
declare const TransportMessageSchema: <T extends TSchema>(t: T) => _sinclair_typebox.TObject<{
|
|
21
|
-
id: _sinclair_typebox.TString;
|
|
22
|
-
from: _sinclair_typebox.TString;
|
|
23
|
-
to: _sinclair_typebox.TString;
|
|
24
|
-
seq: _sinclair_typebox.TInteger;
|
|
25
|
-
ack: _sinclair_typebox.TInteger;
|
|
26
|
-
serviceName: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
27
|
-
procedureName: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
28
|
-
streamId: _sinclair_typebox.TString;
|
|
29
|
-
controlFlags: _sinclair_typebox.TInteger;
|
|
30
|
-
tracing: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
31
|
-
traceparent: _sinclair_typebox.TString;
|
|
32
|
-
tracestate: _sinclair_typebox.TString;
|
|
33
|
-
}>>;
|
|
34
|
-
payload: T;
|
|
35
|
-
}>;
|
|
36
|
-
type ProtocolVersion = 'v1.1' | 'v2.0';
|
|
37
|
-
declare const HandshakeErrorCustomHandlerFatalResponseCodes: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"REJECTED_UNSUPPORTED_CLIENT">, _sinclair_typebox.TLiteral<"REJECTED_BY_CUSTOM_HANDLER">]>;
|
|
38
|
-
declare const HandshakeErrorResponseCodes: _sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"SESSION_STATE_MISMATCH">, _sinclair_typebox.TUnion<[_sinclair_typebox.TUnion<[_sinclair_typebox.TLiteral<"REJECTED_UNSUPPORTED_CLIENT">, _sinclair_typebox.TLiteral<"REJECTED_BY_CUSTOM_HANDLER">]>, _sinclair_typebox.TLiteral<"MALFORMED_HANDSHAKE_META">, _sinclair_typebox.TLiteral<"MALFORMED_HANDSHAKE">, _sinclair_typebox.TLiteral<"PROTOCOL_VERSION_MISMATCH">]>]>;
|
|
39
|
-
/**
|
|
40
|
-
* Defines the schema for an opaque transport message that is agnostic to any
|
|
41
|
-
* procedure/service.
|
|
42
|
-
* @returns The transport message schema.
|
|
43
|
-
*/
|
|
44
|
-
declare const OpaqueTransportMessageSchema: _sinclair_typebox.TObject<{
|
|
45
|
-
id: _sinclair_typebox.TString;
|
|
46
|
-
from: _sinclair_typebox.TString;
|
|
47
|
-
to: _sinclair_typebox.TString;
|
|
48
|
-
seq: _sinclair_typebox.TInteger;
|
|
49
|
-
ack: _sinclair_typebox.TInteger;
|
|
50
|
-
serviceName: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
51
|
-
procedureName: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
|
|
52
|
-
streamId: _sinclair_typebox.TString;
|
|
53
|
-
controlFlags: _sinclair_typebox.TInteger;
|
|
54
|
-
tracing: _sinclair_typebox.TOptional<_sinclair_typebox.TObject<{
|
|
55
|
-
traceparent: _sinclair_typebox.TString;
|
|
56
|
-
tracestate: _sinclair_typebox.TString;
|
|
57
|
-
}>>;
|
|
58
|
-
payload: _sinclair_typebox.TUnknown;
|
|
59
|
-
}>;
|
|
60
|
-
/**
|
|
61
|
-
* Represents a transport message. This is the same type as {@link TransportMessageSchema} but
|
|
62
|
-
* we can't statically infer generics from generic Typebox schemas so we have to define it again here.
|
|
63
|
-
*
|
|
64
|
-
* TypeScript can't enforce types when a bitmask is involved, so these are the semantics of
|
|
65
|
-
* `controlFlags`:
|
|
66
|
-
* * If `controlFlags & StreamOpenBit == StreamOpenBit`, `streamId` must be set to a unique value
|
|
67
|
-
* (suggestion: use `nanoid`).
|
|
68
|
-
* * If `controlFlags & StreamOpenBit == StreamOpenBit`, `serviceName` and `procedureName` must be set.
|
|
69
|
-
* * If `controlFlags & StreamClosedBit == StreamClosedBit` and the kind is `stream` or `subscription`,
|
|
70
|
-
* `payload` should be discarded (usually contains a control message).
|
|
71
|
-
* * If `controlFlags & AckBit == AckBit`, the message is an explicit acknowledgement message and doesn't
|
|
72
|
-
* contain any payload that is relevant to the application so should not be delivered.
|
|
73
|
-
* @template Payload The type of the payload.
|
|
74
|
-
*/
|
|
75
|
-
interface TransportMessage<Payload = unknown> {
|
|
76
|
-
id: string;
|
|
77
|
-
from: TransportClientId;
|
|
78
|
-
to: TransportClientId;
|
|
79
|
-
seq: number;
|
|
80
|
-
ack: number;
|
|
81
|
-
serviceName?: string;
|
|
82
|
-
procedureName?: string;
|
|
83
|
-
streamId: string;
|
|
84
|
-
controlFlags: number;
|
|
85
|
-
tracing?: PropagationContext;
|
|
86
|
-
payload: Payload;
|
|
87
|
-
}
|
|
88
|
-
type PartialTransportMessage<Payload = unknown> = Omit<TransportMessage<Payload>, 'id' | 'from' | 'to' | 'seq' | 'ack'>;
|
|
89
|
-
/**
|
|
90
|
-
* A type alias for a transport message with an opaque payload.
|
|
91
|
-
* @template T - The type of the opaque payload.
|
|
92
|
-
*/
|
|
93
|
-
type OpaqueTransportMessage = TransportMessage;
|
|
94
|
-
type TransportClientId = string;
|
|
95
|
-
/**
|
|
96
|
-
* Checks if the given control flag (usually found in msg.controlFlag) is a stream open message.
|
|
97
|
-
* @param controlFlag - The control flag to check.
|
|
98
|
-
* @returns True if the control flag contains the StreamOpenBit, false otherwise.
|
|
99
|
-
*/
|
|
100
|
-
declare function isStreamOpen(controlFlag: number): boolean;
|
|
101
|
-
/**
|
|
102
|
-
* Checks if the given control flag (usually found in msg.controlFlag) is a stream close message.
|
|
103
|
-
* @param controlFlag - The control flag to check.
|
|
104
|
-
* @returns True if the control flag contains the StreamCloseBit, false otherwise.
|
|
105
|
-
*/
|
|
106
|
-
declare function isStreamClose(controlFlag: number): boolean;
|
|
107
|
-
|
|
108
|
-
export { HandshakeErrorCustomHandlerFatalResponseCodes as H, type OpaqueTransportMessage as O, type ProtocolVersion as P, type TransportClientId as T, type PartialTransportMessage as a, type TelemetryInfo as b, type TransportMessage as c, HandshakeErrorResponseCodes as d, TransportMessageSchema as e, OpaqueTransportMessageSchema as f, isStreamClose as g, isStreamOpen as i };
|