@replit/river 0.213.1 → 0.214.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-2A645F27.js → chunk-DRYCLL6N.js} +2 -2
- package/dist/{chunk-X4PP65DW.js → chunk-LECVFB2G.js} +45 -10
- package/dist/{chunk-X4PP65DW.js.map → chunk-LECVFB2G.js.map} +1 -1
- package/dist/codec/index.js +2 -2
- package/dist/router/index.cjs +47 -9
- package/dist/router/index.cjs.map +1 -1
- package/dist/router/index.d.cts +3 -3
- package/dist/router/index.d.ts +3 -3
- package/dist/router/index.js +1 -1
- package/dist/{services-ChTb4jmc.d.ts → services-D47_GPCH.d.ts} +17 -1
- package/dist/{services-C656NVV3.d.cts → services-DqYQvm_L.d.cts} +17 -1
- package/dist/testUtil/index.cjs +1 -1
- package/dist/testUtil/index.cjs.map +1 -1
- package/dist/testUtil/index.d.cts +1 -1
- package/dist/testUtil/index.d.ts +1 -1
- package/dist/testUtil/index.js +2 -2
- 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.js +2 -2
- 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.js +2 -2
- package/dist/transport/index.cjs +1 -1
- package/dist/transport/index.cjs.map +1 -1
- package/dist/transport/index.js +2 -2
- package/package.json +1 -1
- /package/dist/{chunk-2A645F27.js.map → chunk-DRYCLL6N.js.map} +0 -0
package/dist/router/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AnyServiceSchemaMap, M as MaybeDisposable, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-
|
|
2
|
-
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, N as Err, T as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, X as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, _ as ResponseData, Q as Result, Z as ResultUnwrapErr, Y as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-
|
|
1
|
+
import { A as AnyServiceSchemaMap, M as MaybeDisposable, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-DqYQvm_L.cjs';
|
|
2
|
+
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, N as Err, T as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, X as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, _ as ResponseData, Q as Result, Z as ResultUnwrapErr, Y as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-DqYQvm_L.cjs';
|
|
3
3
|
import { TSchema, Static } from '@sinclair/typebox';
|
|
4
4
|
import { c as TransportClientId, b as OpaqueTransportMessage } from '../message-Dlsh5WDF.cjs';
|
|
5
5
|
import { C as Connection, q as ServerHandshakeOptions } from '../transport-CxT7y8Qk.cjs';
|
|
@@ -74,6 +74,6 @@ declare function createServer<MetadataSchema extends TSchema, ParsedMetadata ext
|
|
|
74
74
|
middlewares?: Array<Middleware>;
|
|
75
75
|
}>): Server<Context, ParsedMetadata, Services>;
|
|
76
76
|
|
|
77
|
-
var version = "0.
|
|
77
|
+
var version = "0.214.0";
|
|
78
78
|
|
|
79
79
|
export { MaybeDisposable, type Middleware, type MiddlewareContext, type MiddlewareParam, PayloadType, ProcedureHandlerContext, version as RIVER_VERSION, type Server, createServer };
|
package/dist/router/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as AnyServiceSchemaMap, M as MaybeDisposable, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-
|
|
2
|
-
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, N as Err, T as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, X as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, _ as ResponseData, Q as Result, Z as ResultUnwrapErr, Y as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-
|
|
1
|
+
import { A as AnyServiceSchemaMap, M as MaybeDisposable, P as ProcedureHandlerContext, a as PayloadType, I as InstantiatedServiceSchemaMap, b as AnyProcedure } from '../services-D47_GPCH.js';
|
|
2
|
+
export { J as BaseErrorSchemaType, G as CANCEL_CODE, L as Client, N as Err, T as ErrResult, F as INVALID_REQUEST_CODE, O as Ok, X as OkResult, h as ProcErrors, d as ProcHandler, e as ProcInit, f as ProcRequest, g as ProcResponse, i as ProcType, z as Procedure, B as ProcedureErrorSchemaType, r as ProcedureMap, R as RPCProcedure, y as RawReadable, v as Readable, x as ReadableBrokenError, w as ReadableResult, H as ReaderErrorSchema, _ as ResponseData, Q as Result, Z as ResultUnwrapErr, Y as ResultUnwrapOk, m as SerializedProcedureSchema, q as SerializedProcedureSchemaProtocolv1, k as SerializedServerSchema, o as SerializedServerSchemaProtocolv1, l as SerializedServiceSchema, p as SerializedServiceSchemaProtocolv1, S as Service, c as ServiceConfiguration, u as StreamProcedure, t as SubscriptionProcedure, D as UNCAUGHT_ERROR_CODE, E as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as Writable, K as createClient, j as createServiceSchema, C as flattenErrorType, s as serializeSchema, n as serializeSchemaV1Compat } from '../services-D47_GPCH.js';
|
|
3
3
|
import { TSchema, Static } from '@sinclair/typebox';
|
|
4
4
|
import { c as TransportClientId, b as OpaqueTransportMessage } from '../message-Dlsh5WDF.js';
|
|
5
5
|
import { C as Connection, q as ServerHandshakeOptions } from '../transport-pdbkDzmJ.js';
|
|
@@ -74,6 +74,6 @@ declare function createServer<MetadataSchema extends TSchema, ParsedMetadata ext
|
|
|
74
74
|
middlewares?: Array<Middleware>;
|
|
75
75
|
}>): Server<Context, ParsedMetadata, Services>;
|
|
76
76
|
|
|
77
|
-
var version = "0.
|
|
77
|
+
var version = "0.214.0";
|
|
78
78
|
|
|
79
79
|
export { MaybeDisposable, type Middleware, type MiddlewareContext, type MiddlewareParam, PayloadType, ProcedureHandlerContext, version as RIVER_VERSION, type Server, createServer };
|
package/dist/router/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
|
-
import {
|
|
2
|
+
import { TObject, TLiteral, TEnum, TString, TSchema, TNever, TUnion, Static } from '@sinclair/typebox';
|
|
3
3
|
import { Span } from '@opentelemetry/api';
|
|
4
4
|
import { c as TransportClientId } from './message-Dlsh5WDF.js';
|
|
5
5
|
import { C as Connection, n as ClientHandshakeOptions, z as SessionId } from './transport-pdbkDzmJ.js';
|
|
@@ -406,6 +406,22 @@ type ProcedureHandlerContext<State, Context, ParsedMetadata> = Context & {
|
|
|
406
406
|
* the river documentation to understand the difference between the two concepts.
|
|
407
407
|
*/
|
|
408
408
|
cancel: (message?: string) => ErrResult<Static<typeof CancelErrorSchema>>;
|
|
409
|
+
/**
|
|
410
|
+
* Register a cleanup function that will run after the procedure handler
|
|
411
|
+
* completes (whether it returns normally, throws, or is cancelled).
|
|
412
|
+
* Cleanup functions run in reverse registration order (LIFO) and each
|
|
413
|
+
* cleanup is awaited before the next one starts.
|
|
414
|
+
*
|
|
415
|
+
* Prefer this over registering async cleanup work on `signal`'s 'abort'
|
|
416
|
+
* event. Abort signal callbacks fire synchronously and do not await async
|
|
417
|
+
* work, so multiple async callbacks will interlace their execution
|
|
418
|
+
* (coroutine-like behavior) rather than running sequentially to completion.
|
|
419
|
+
* `deferCleanup` guarantees each cleanup finishes before the next begins.
|
|
420
|
+
*
|
|
421
|
+
* If a cleanup function throws, the error is recorded on the cleanup span
|
|
422
|
+
* but remaining cleanups continue to run.
|
|
423
|
+
*/
|
|
424
|
+
deferCleanup: (fn: () => void | Promise<void>) => void;
|
|
409
425
|
/**
|
|
410
426
|
* This signal is a standard [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
|
|
411
427
|
* triggered when the procedure invocation is done. This signal tracks the invocation/request finishing
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
2
|
-
import {
|
|
2
|
+
import { TObject, TLiteral, TEnum, TString, TSchema, TNever, TUnion, Static } from '@sinclair/typebox';
|
|
3
3
|
import { Span } from '@opentelemetry/api';
|
|
4
4
|
import { c as TransportClientId } from './message-Dlsh5WDF.cjs';
|
|
5
5
|
import { C as Connection, n as ClientHandshakeOptions, z as SessionId } from './transport-CxT7y8Qk.cjs';
|
|
@@ -406,6 +406,22 @@ type ProcedureHandlerContext<State, Context, ParsedMetadata> = Context & {
|
|
|
406
406
|
* the river documentation to understand the difference between the two concepts.
|
|
407
407
|
*/
|
|
408
408
|
cancel: (message?: string) => ErrResult<Static<typeof CancelErrorSchema>>;
|
|
409
|
+
/**
|
|
410
|
+
* Register a cleanup function that will run after the procedure handler
|
|
411
|
+
* completes (whether it returns normally, throws, or is cancelled).
|
|
412
|
+
* Cleanup functions run in reverse registration order (LIFO) and each
|
|
413
|
+
* cleanup is awaited before the next one starts.
|
|
414
|
+
*
|
|
415
|
+
* Prefer this over registering async cleanup work on `signal`'s 'abort'
|
|
416
|
+
* event. Abort signal callbacks fire synchronously and do not await async
|
|
417
|
+
* work, so multiple async callbacks will interlace their execution
|
|
418
|
+
* (coroutine-like behavior) rather than running sequentially to completion.
|
|
419
|
+
* `deferCleanup` guarantees each cleanup finishes before the next begins.
|
|
420
|
+
*
|
|
421
|
+
* If a cleanup function throws, the error is recorded on the cleanup span
|
|
422
|
+
* but remaining cleanups continue to run.
|
|
423
|
+
*/
|
|
424
|
+
deferCleanup: (fn: () => void | Promise<void>) => void;
|
|
409
425
|
/**
|
|
410
426
|
* This signal is a standard [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
|
|
411
427
|
* triggered when the procedure invocation is done. This signal tracks the invocation/request finishing
|