@replit/river
Advanced tools
Comparing version 0.200.0-rc.10 to 0.200.0-rc.11
@@ -1,3 +0,3 @@ | ||
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap } from '../services-1b5ac5bc.js'; | ||
export { z as ABORT_CODE, B as BaseErrorSchemaType, F as Client, H as Err, E as ErrResult, v as INTERNAL_RIVER_ERROR_CODE, y as INVALID_REQUEST_CODE, G as Ok, O as OkResult, L as Output, P as PayloadType, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, b as Procedure, a as ProcedureErrorSchemaType, q as ProcedureMap, r as RPCProcedure, R as ReadStream, C as RequestReaderErrorSchema, d as ResponseReaderErrorSchema, c as Result, K as ResultUnwrapErr, J as ResultUnwrapOk, p as SerializedProcedureSchema, n as SerializedServerSchema, o as SerializedServiceSchema, e as Service, f as ServiceConfiguration, m as ServiceSchema, u as StreamProcedure, t as SubscriptionProcedure, w as UNCAUGHT_ERROR_CODE, x as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as WriteStream, D as createClient, s as serializeSchema } from '../services-1b5ac5bc.js'; | ||
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap } from '../services-897ef2f1.js'; | ||
export { C as ABORT_CODE, B as BaseErrorSchemaType, G as Client, J as Err, E as ErrResult, w as INTERNAL_RIVER_ERROR_CODE, z as INVALID_REQUEST_CODE, H as Ok, O as OkResult, M as Output, P as PayloadType, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, b as Procedure, a as ProcedureErrorSchemaType, r as ProcedureMap, t as RPCProcedure, R as ReadStream, D as RequestReaderErrorSchema, d as ResponseReaderErrorSchema, c as Result, L as ResultUnwrapErr, K as ResultUnwrapOk, q as SerializedProcedureSchema, o as SerializedServerSchema, p as SerializedServiceSchema, e as Service, f as ServiceConfiguration, m as ServiceSchema, v as StreamProcedure, u as SubscriptionProcedure, x as UNCAUGHT_ERROR_CODE, y as UNEXPECTED_DISCONNECT_CODE, U as UploadProcedure, V as ValidProcType, W as WriteStream, F as createClient, s as serializeSchema, n as serializeSchemaBackwardsCompatible } from '../services-897ef2f1.js'; | ||
import { C as Connection, s as ServerHandshakeOptions, o as ServiceContext } from '../context-b4aff18f.js'; | ||
@@ -48,4 +48,4 @@ export { t as ParsedMetadata, u as ProcedureHandlerContext, v as createClientHandshakeOptions, w as createServerHandshakeOptions } from '../context-b4aff18f.js'; | ||
var version = "0.200.0-rc.10"; | ||
var version = "0.200.0-rc.11"; | ||
export { version as RIVER_VERSION, Server, ServiceContext, createServer }; |
@@ -33,6 +33,19 @@ import { | ||
version | ||
} from "../chunk-B6JVGGZM.js"; | ||
} from "../chunk-YBEJ5Z6T.js"; | ||
// router/services.ts | ||
import { Type } from "@sinclair/typebox"; | ||
function serializeSchemaBackwardsCompatible(services, handshakeSchema) { | ||
const serializedServiceObject = Object.entries(services).reduce((acc, [name, value]) => { | ||
acc[name] = value.serializeBackwardsCompatible(); | ||
return acc; | ||
}, {}); | ||
const schema = { | ||
services: serializedServiceObject | ||
}; | ||
if (handshakeSchema) { | ||
schema.handshakeSchema = Type.Strict(handshakeSchema); | ||
} | ||
return schema; | ||
} | ||
function serializeSchema(services, handshakeSchema) { | ||
@@ -1256,4 +1269,5 @@ const serializedServiceObject = Object.entries(services).reduce((acc, [name, value]) => { | ||
createServerHandshakeOptions, | ||
serializeSchema | ||
serializeSchema, | ||
serializeSchemaBackwardsCompatible | ||
}; | ||
//# sourceMappingURL=index.js.map |
import { | ||
ClientTransport | ||
} from "../../../chunk-6L6S2R44.js"; | ||
} from "../../../chunk-7IV2GXVL.js"; | ||
import { | ||
WebSocketConnection | ||
} from "../../../chunk-GZJBYYHE.js"; | ||
import "../../../chunk-UAJT22KM.js"; | ||
} from "../../../chunk-CET55YBT.js"; | ||
import "../../../chunk-52YTHRKE.js"; | ||
import "../../../chunk-VXYHC666.js"; | ||
import "../../../chunk-6N4GLYYL.js"; | ||
import "../../../chunk-B6JVGGZM.js"; | ||
import "../../../chunk-3VVCIRGI.js"; | ||
import "../../../chunk-YBEJ5Z6T.js"; | ||
import "../../../chunk-4PVU7J25.js"; | ||
@@ -12,0 +12,0 @@ |
import { | ||
ServerTransport | ||
} from "../../../chunk-2E7ILLZ7.js"; | ||
} from "../../../chunk-LD5LKUXN.js"; | ||
import { | ||
WebSocketConnection | ||
} from "../../../chunk-GZJBYYHE.js"; | ||
import "../../../chunk-UAJT22KM.js"; | ||
} from "../../../chunk-CET55YBT.js"; | ||
import "../../../chunk-52YTHRKE.js"; | ||
import "../../../chunk-VXYHC666.js"; | ||
import "../../../chunk-6N4GLYYL.js"; | ||
import "../../../chunk-B6JVGGZM.js"; | ||
import "../../../chunk-3VVCIRGI.js"; | ||
import "../../../chunk-YBEJ5Z6T.js"; | ||
import "../../../chunk-4PVU7J25.js"; | ||
@@ -12,0 +12,0 @@ |
import { | ||
ClientTransport | ||
} from "../chunk-6L6S2R44.js"; | ||
} from "../chunk-7IV2GXVL.js"; | ||
import { | ||
ServerTransport | ||
} from "../chunk-2E7ILLZ7.js"; | ||
} from "../chunk-LD5LKUXN.js"; | ||
import { | ||
@@ -11,11 +11,11 @@ Connection, | ||
Transport | ||
} from "../chunk-UAJT22KM.js"; | ||
} from "../chunk-52YTHRKE.js"; | ||
import "../chunk-VXYHC666.js"; | ||
import { | ||
SessionState | ||
} from "../chunk-6N4GLYYL.js"; | ||
} from "../chunk-3VVCIRGI.js"; | ||
import { | ||
OpaqueTransportMessageSchema, | ||
TransportMessageSchema | ||
} from "../chunk-B6JVGGZM.js"; | ||
} from "../chunk-YBEJ5Z6T.js"; | ||
import "../chunk-4PVU7J25.js"; | ||
@@ -22,0 +22,0 @@ export { |
import { T as Transport, C as Connection, m as SessionOptions, n as ClientTransportOptions, e as SessionNoConnection, o as ServiceContext, S as Session } from '../context-b4aff18f.js'; | ||
import { Static } from '@sinclair/typebox'; | ||
import { P as PartialTransportMessage, b as OpaqueTransportMessage } from '../message-7d135e38.js'; | ||
import { B as BaseErrorSchemaType, R as ReadStream, S as SimpleIterator, O as OkResult, E as ErrResult, P as PayloadType, a as ProcedureErrorSchemaType, b as Procedure, c as Result, d as ResponseReaderErrorSchema, W as WriteStream } from '../services-1b5ac5bc.js'; | ||
import { B as BaseErrorSchemaType, R as ReadStream, S as SimpleIterator, O as OkResult, E as ErrResult, P as PayloadType, a as ProcedureErrorSchemaType, b as Procedure, c as Result, d as ResponseReaderErrorSchema, W as WriteStream } from '../services-897ef2f1.js'; | ||
import NodeWs from 'ws'; | ||
@@ -6,0 +6,0 @@ import http from 'node:http'; |
@@ -12,7 +12,7 @@ import { | ||
defaultTransportOptions | ||
} from "../chunk-6N4GLYYL.js"; | ||
} from "../chunk-3VVCIRGI.js"; | ||
import { | ||
coerceErrorString, | ||
currentProtocolVersion | ||
} from "../chunk-B6JVGGZM.js"; | ||
} from "../chunk-YBEJ5Z6T.js"; | ||
import "../chunk-4PVU7J25.js"; | ||
@@ -19,0 +19,0 @@ |
{ | ||
"name": "@replit/river", | ||
"description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!", | ||
"version": "0.200.0-rc.10", | ||
"version": "0.200.0-rc.11", | ||
"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
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
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
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
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
1570722
16034