@replit/river 0.200.5 → 0.202.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-MSJGPQRT.js → chunk-2T22KY5X.js} +4 -6
- package/dist/chunk-2T22KY5X.js.map +1 -0
- package/dist/{chunk-Z7Q5CDXD.js → chunk-BDUOHZMF.js} +2 -2
- package/dist/{chunk-WN7GEBMX.js → chunk-NSH4D6OB.js} +5 -7
- package/dist/chunk-NSH4D6OB.js.map +1 -0
- package/dist/{chunk-64J442AK.js → chunk-QMXUCLGE.js} +10 -10
- package/dist/chunk-QMXUCLGE.js.map +1 -0
- package/dist/{chunk-3FMY7VTM.js → chunk-W4AGHFXK.js} +332 -3
- package/dist/chunk-W4AGHFXK.js.map +1 -0
- package/dist/{client-ba6815ae.d.ts → client-a32692b0.d.ts} +2 -2
- package/dist/{connection-d217c989.d.ts → connection-48d021ca.d.ts} +2 -2
- package/dist/{context-8d1ed9a1.d.ts → context-8d263a7f.d.ts} +2 -2
- package/dist/logging/index.d.cts +1 -1
- package/dist/logging/index.d.ts +1 -1
- package/dist/{message-45658364.d.ts → message-3def9ded.d.ts} +1 -1
- package/dist/router/index.cjs +21 -4
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +10 -9
- package/dist/router/index.d.ts +10 -9
- package/dist/router/index.js +337 -42
- package/dist/router/index.js.map +1 -1
- package/dist/{server-eb7d2cfd.d.ts → server-48d90a77.d.ts} +2 -2
- package/dist/{services-94e0afc3.d.ts → services-a05f5174.d.ts} +11 -6
- package/dist/testUtil/index.cjs +2616 -0
- package/dist/testUtil/index.cjs.map +1 -0
- package/dist/{util/testHelpers.d.ts → testUtil/index.d.cts} +27 -18
- package/dist/{util/testHelpers.d.cts → testUtil/index.d.ts} +27 -18
- package/dist/testUtil/index.js +370 -0
- package/dist/testUtil/index.js.map +1 -0
- package/dist/transport/impls/ws/client.cjs +2 -2
- package/dist/transport/impls/ws/client.cjs.map +1 -1
- package/dist/transport/impls/ws/client.d.cts +4 -4
- package/dist/transport/impls/ws/client.d.ts +4 -4
- package/dist/transport/impls/ws/client.js +4 -5
- package/dist/transport/impls/ws/client.js.map +1 -1
- package/dist/transport/impls/ws/server.cjs +2 -2
- 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 -5
- package/dist/transport/impls/ws/server.js.map +1 -1
- package/dist/transport/index.cjs +2 -2
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.d.cts +4 -4
- package/dist/transport/index.d.ts +4 -4
- package/dist/transport/index.js +6 -8
- package/package.json +3 -3
- package/dist/chunk-3FMY7VTM.js.map +0 -1
- package/dist/chunk-64J442AK.js.map +0 -1
- package/dist/chunk-7Z5MSOKL.js +0 -340
- package/dist/chunk-7Z5MSOKL.js.map +0 -1
- package/dist/chunk-MSJGPQRT.js.map +0 -1
- package/dist/chunk-WN7GEBMX.js.map +0 -1
- package/dist/chunk-ZVWJN6V2.js +0 -307
- package/dist/chunk-ZVWJN6V2.js.map +0 -1
- package/dist/util/testHelpers.cjs +0 -1563
- package/dist/util/testHelpers.cjs.map +0 -1
- package/dist/util/testHelpers.js +0 -250
- package/dist/util/testHelpers.js.map +0 -1
- /package/dist/{chunk-Z7Q5CDXD.js.map → chunk-BDUOHZMF.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TObject, TString, TSchema, TUnion, TLiteral, TNever, Static } from '@sinclair/typebox';
|
|
2
|
-
import { C as Connection,
|
|
3
|
-
import { c as TransportClientId } from './message-
|
|
4
|
-
import { C as ClientTransport } from './client-
|
|
2
|
+
import { C as Connection, n as ClientHandshakeOptions, t as ProcedureHandlerContext, s as ServiceContext } from './context-8d263a7f.js';
|
|
3
|
+
import { c as TransportClientId } from './message-3def9ded.js';
|
|
4
|
+
import { C as ClientTransport } from './client-a32692b0.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* {@link UNCAUGHT_ERROR_CODE} is the code that is used when an error is thrown
|
|
@@ -504,6 +504,7 @@ declare const Procedure: {
|
|
|
504
504
|
interface Service<State extends object, Procs extends ProcedureMap<State>> {
|
|
505
505
|
readonly state: State;
|
|
506
506
|
readonly procedures: Procs;
|
|
507
|
+
[Symbol.asyncDispose]: () => Promise<void>;
|
|
507
508
|
}
|
|
508
509
|
/**
|
|
509
510
|
* Represents any {@link Service} object.
|
|
@@ -567,6 +568,10 @@ type ProcType<S extends AnyService, ProcName extends keyof S['procedures']> = S[
|
|
|
567
568
|
* was created via the {@link Procedure} constructors.
|
|
568
569
|
*/
|
|
569
570
|
type BrandedProcedureMap<State> = Record<string, Branded<AnyProcedure<State>>>;
|
|
571
|
+
type MaybeDisposable<State extends object> = State & {
|
|
572
|
+
[Symbol.asyncDispose]?: () => Promise<void>;
|
|
573
|
+
[Symbol.dispose]?: () => void;
|
|
574
|
+
};
|
|
570
575
|
/**
|
|
571
576
|
* The configuration for a service.
|
|
572
577
|
*/
|
|
@@ -574,7 +579,7 @@ interface ServiceConfiguration<State extends object> {
|
|
|
574
579
|
/**
|
|
575
580
|
* A factory function for creating a fresh state.
|
|
576
581
|
*/
|
|
577
|
-
initializeState: (extendedContext: ServiceContext) => State
|
|
582
|
+
initializeState: (extendedContext: ServiceContext) => MaybeDisposable<State>;
|
|
578
583
|
}
|
|
579
584
|
interface SerializedProcedureSchemaProtocolv1 {
|
|
580
585
|
init?: PayloadType;
|
|
@@ -636,7 +641,7 @@ declare class ServiceSchema<State extends object, Procedures extends ProcedureMa
|
|
|
636
641
|
/**
|
|
637
642
|
* Factory function for creating a fresh state.
|
|
638
643
|
*/
|
|
639
|
-
protected readonly initializeState: (extendedContext: ServiceContext) => State
|
|
644
|
+
protected readonly initializeState: (extendedContext: ServiceContext) => MaybeDisposable<State>;
|
|
640
645
|
/**
|
|
641
646
|
* The procedures for this service.
|
|
642
647
|
*/
|
|
@@ -833,4 +838,4 @@ declare class ServiceScaffold<State extends object> {
|
|
|
833
838
|
}>;
|
|
834
839
|
}
|
|
835
840
|
|
|
836
|
-
export { AnyServiceSchemaMap as A,
|
|
841
|
+
export { AnyServiceSchemaMap as A, INVALID_REQUEST_CODE as B, CANCEL_CODE as C, ReaderErrorSchema as D, BaseErrorSchemaType as E, createClient as F, Client as G, Err as H, InstantiatedServiceSchemaMap as I, unwrapOrThrow as J, Result as K, ErrResult as L, OkResult as M, ResultUnwrapOk as N, Ok as O, ProcHandler as P, ResultUnwrapErr as Q, RpcProcedure as R, Service as S, ResponseData as T, UploadProcedure as U, ValidProcType as V, Writable as W, ReadableIterator as X, ReadableResult as Y, AnyProcedure as a, ServiceConfiguration as b, ProcInit as c, ProcRequest as d, ProcResponse as e, ProcErrors as f, ProcType as g, ServiceSchema as h, SerializedServerSchema as i, SerializedServiceSchema as j, SerializedProcedureSchema as k, serializeSchemaV1Compat as l, SerializedServerSchemaProtocolv1 as m, SerializedServiceSchemaProtocolv1 as n, SerializedProcedureSchemaProtocolv1 as o, PayloadType as p, ProcedureMap as q, SubscriptionProcedure as r, serializeSchema as s, StreamProcedure as t, Readable as u, Procedure as v, ProcedureErrorSchemaType as w, flattenErrorType as x, UNCAUGHT_ERROR_CODE as y, UNEXPECTED_DISCONNECT_CODE as z };
|