@replit/river
Advanced tools
Comparing version 0.17.1 to 0.17.2
@@ -1,4 +0,4 @@ | ||
import { TObject, TUnion, Static } from '@sinclair/typebox'; | ||
import { e as ProcedureMap, c as RiverUncaughtSchema, U as Unbranded, B as Branded, A as AnyProcedure, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../procedures-b5ddb54d.js'; | ||
export { E as Err, O as Ok, a as Procedure, d as ProcedureResult, f as RPCProcedure, m as RiverErrorSchema, j as ServiceContextWithState, k as ServiceContextWithTransportInfo, i as StreamProcedure, h as SubscriptionProcedure, l as UNCAUGHT_ERROR, g as UploadProcedure, V as ValidProcType } from '../procedures-b5ddb54d.js'; | ||
import { TUnion, Static } from '@sinclair/typebox'; | ||
import { e as ProcedureMap, P as PayloadType, c as RiverUncaughtSchema, U as Unbranded, B as Branded, A as AnyProcedure, R as RiverError, b as Result, S as ServiceContext } from '../procedures-1a298406.js'; | ||
export { E as Err, O as Ok, a as Procedure, d as ProcedureResult, f as RPCProcedure, m as RiverErrorSchema, j as ServiceContextWithState, k as ServiceContextWithTransportInfo, i as StreamProcedure, h as SubscriptionProcedure, l as UNCAUGHT_ERROR, g as UploadProcedure, V as ValidProcType } from '../procedures-1a298406.js'; | ||
import { d as ServerTransport, C as Connection, a as ClientTransport, b as TransportClientId } from '../index-8df0bdfb.js'; | ||
@@ -48,3 +48,3 @@ import { Pushable } from 'it-pushable'; | ||
type ProcHasInit<S extends AnyService, ProcName extends keyof S['procedures']> = S['procedures'][ProcName] extends { | ||
init: TObject; | ||
init: PayloadType; | ||
} ? true : false; | ||
@@ -57,3 +57,3 @@ /** | ||
type ProcInit<S extends AnyService, ProcName extends keyof S['procedures']> = S['procedures'][ProcName] extends { | ||
init: TObject; | ||
init: PayloadType; | ||
} ? S['procedures'][ProcName]['init'] : never; | ||
@@ -98,2 +98,11 @@ /** | ||
} | ||
interface SerializedServiceSchema { | ||
procedures: Record<string, { | ||
input: PayloadType; | ||
output: PayloadType; | ||
errors?: RiverError; | ||
type: 'rpc' | 'subscription' | 'upload' | 'stream'; | ||
init?: PayloadType; | ||
}>; | ||
} | ||
/** | ||
@@ -245,3 +254,3 @@ * The schema for a {@link Service}. This is used to define a service, specifically | ||
*/ | ||
serialize(): object; | ||
serialize(): SerializedServiceSchema; | ||
/** | ||
@@ -320,2 +329,3 @@ * Instantiates this schema into a {@link Service} object. | ||
streams: Map<string, ProcStream>; | ||
serialize(): SerializedServerSchema; | ||
close(): Promise<void>; | ||
@@ -334,2 +344,3 @@ } | ||
} | ||
type SerializedServerSchema = Record<string, SerializedServiceSchema>; | ||
/** | ||
@@ -336,0 +347,0 @@ * Creates a server instance that listens for incoming messages from a transport and routes them to the appropriate service and procedure. |
@@ -10,3 +10,3 @@ import { | ||
createServer | ||
} from "../chunk-7IQO434V.js"; | ||
} from "../chunk-4C2OXQJB.js"; | ||
import "../chunk-VH3NGOXQ.js"; | ||
@@ -13,0 +13,0 @@ import "../chunk-H4BYJELI.js"; |
import { Static } from '@sinclair/typebox'; | ||
import { P as PayloadType, R as RiverError, a as Procedure, S as ServiceContext, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../procedures-b5ddb54d.js'; | ||
import { P as PayloadType, R as RiverError, a as Procedure, S as ServiceContext, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../procedures-1a298406.js'; | ||
import { P as PartialTransportMessage, T as Transport, C as Connection, O as OpaqueTransportMessage, S as SessionOptions } from '../index-8df0bdfb.js'; | ||
@@ -4,0 +4,0 @@ import * as it_pushable from 'it-pushable'; |
import { | ||
UNCAUGHT_ERROR, | ||
pushable | ||
} from "../chunk-7IQO434V.js"; | ||
} from "../chunk-4C2OXQJB.js"; | ||
import "../chunk-RPIDSIQG.js"; | ||
@@ -6,0 +6,0 @@ import { |
{ | ||
"name": "@replit/river", | ||
"description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!", | ||
"version": "0.17.1", | ||
"version": "0.17.2", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
402547
11536