@replit/river
Advanced tools
Comparing version 0.23.16 to 0.23.18
@@ -1,53 +0,14 @@ | ||
import { S as SerializedServerSchema, A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-75e84a9f.js'; | ||
export { C as Client, E as Err, O as Ok, z as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, p as ProcedureMap, d as ProcedureResult, q as RPCProcedure, y as ResultUnwrapErr, x as ResultUnwrapOk, w as RiverErrorSchema, c as RiverUncaughtSchema, o as SerializedProcedureSchema, n as SerializedServiceSchema, e as Service, f as ServiceConfiguration, m as ServiceSchema, t as StreamProcedure, r as SubscriptionProcedure, v as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, u as createClient, s as serializeSchema } from '../services-75e84a9f.js'; | ||
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-38b3f758.js'; | ||
export { C as Client, E as Err, O as Ok, z as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k as ProcType, a as Procedure, p as ProcedureMap, d as ProcedureResult, q as RPCProcedure, y as ResultUnwrapErr, x as ResultUnwrapOk, w as RiverErrorSchema, c as RiverUncaughtSchema, o as SerializedProcedureSchema, m as SerializedServerSchema, n as SerializedServiceSchema, S as Service, e as ServiceConfiguration, l as ServiceSchema, t as StreamProcedure, r as SubscriptionProcedure, v as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, u as createClient, s as serializeSchema } from '../services-38b3f758.js'; | ||
import { Static } from '@sinclair/typebox'; | ||
import { Pushable } from 'it-pushable'; | ||
import { C as Connection, m as ServerHandshakeOptions, i as ServiceContext } from '../handshake-75d0124f.js'; | ||
export { n as ParsedMetadata, o as ServiceContextWithState, p as ServiceContextWithTransportInfo, q as createClientHandshakeOptions, r as createServerHandshakeOptions } from '../handshake-75d0124f.js'; | ||
import { S as ServerTransport } from '../server-3740c5d9.js'; | ||
import { C as Connection, m as ServerHandshakeOptions, i as ServiceContext } from '../handshake-a947c234.js'; | ||
export { n as ParsedMetadata, o as ServiceContextWithState, p as ServiceContextWithTransportInfo, q as createClientHandshakeOptions, r as createServerHandshakeOptions } from '../handshake-a947c234.js'; | ||
import { S as ServerTransport } from '../server-53cd5b7e.js'; | ||
import '../index-ea74cdbb.js'; | ||
import '@sinclair/typebox/value'; | ||
import '@opentelemetry/api'; | ||
import '../client-0926d3d6.js'; | ||
import '../client-5776a6bb.js'; | ||
import '../types-3e5768ec.js'; | ||
interface ServerBreakage { | ||
serviceBreakages: Record<string, ServiceBreakage>; | ||
} | ||
type ServiceBreakage = { | ||
reason: 'removed'; | ||
} | { | ||
reason: 'modified'; | ||
procedureBreakages: Record<string, ProcedureBreakage>; | ||
}; | ||
type ProcedureBreakage = { | ||
reason: 'removed'; | ||
} | { | ||
reason: 'type-changed'; | ||
oldType: string; | ||
newType: string; | ||
} | { | ||
reason: 'modified'; | ||
input?: PayloadBreakage; | ||
init?: PayloadBreakage; | ||
output?: PayloadBreakage; | ||
}; | ||
type PayloadBreakage = { | ||
reason: 'type-changed'; | ||
oldType: string; | ||
newType: string; | ||
} | { | ||
reason: 'new-required'; | ||
} | { | ||
reason: 'removed-required'; | ||
} | { | ||
reason: 'field-breakage'; | ||
fieldBreakages: Record<string, PayloadBreakage>; | ||
}; | ||
interface DiffOptions { | ||
allowServiceRemoval?: boolean; | ||
allowProcedureRemoval?: boolean; | ||
} | ||
declare function diffServerSchema(oldServer: SerializedServerSchema, newServer: SerializedServerSchema, options?: DiffOptions): ServerBreakage | null; | ||
/** | ||
@@ -86,4 +47,4 @@ * Represents a server with a set of services. Use {@link createServer} to create it. | ||
var version = "0.23.16"; | ||
var version = "0.23.18"; | ||
export { DiffOptions, PayloadBreakage, PayloadType, ProcedureBreakage, version as RIVER_VERSION, Result, RiverError, SerializedServerSchema, Server, ServerBreakage, ServiceBreakage, ServiceContext, createServer, diffServerSchema }; | ||
export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer }; |
@@ -12,8 +12,7 @@ import { | ||
createServerHandshakeOptions, | ||
diffServerSchema, | ||
serializeSchema | ||
} from "../chunk-LTSLICON.js"; | ||
} from "../chunk-EV5HW4IC.js"; | ||
import { | ||
version | ||
} from "../chunk-TXSQRTZB.js"; | ||
} from "../chunk-R2HAS3GM.js"; | ||
export { | ||
@@ -31,5 +30,4 @@ Err, | ||
createServerHandshakeOptions, | ||
diffServerSchema, | ||
serializeSchema | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,5 +0,5 @@ | ||
import { U as UdsConnection } from '../../../connection-99a67d3e.js'; | ||
import { U as UdsConnection } from '../../../connection-bd35d442.js'; | ||
import { c as TransportClientId } from '../../../index-ea74cdbb.js'; | ||
import { C as ClientTransport } from '../../../client-0926d3d6.js'; | ||
import { b as ProvidedClientTransportOptions } from '../../../handshake-75d0124f.js'; | ||
import { C as ClientTransport } from '../../../client-5776a6bb.js'; | ||
import { b as ProvidedClientTransportOptions } from '../../../handshake-a947c234.js'; | ||
import 'node:net'; | ||
@@ -6,0 +6,0 @@ import 'node:stream'; |
import { | ||
UdsConnection | ||
} from "../../../chunk-UDXM64QK.js"; | ||
} from "../../../chunk-AVL32IMG.js"; | ||
import { | ||
ClientTransport | ||
} from "../../../chunk-JA7XGTAL.js"; | ||
import "../../../chunk-WN77AT67.js"; | ||
} from "../../../chunk-DPKOJQWF.js"; | ||
import "../../../chunk-J6N6H2WU.js"; | ||
import "../../../chunk-6LCL2ZZF.js"; | ||
import "../../../chunk-YXDAOVP7.js"; | ||
import "../../../chunk-TXSQRTZB.js"; | ||
import "../../../chunk-MW5JXLHY.js"; | ||
import "../../../chunk-R2HAS3GM.js"; | ||
import "../../../chunk-4PVU7J25.js"; | ||
@@ -12,0 +12,0 @@ |
import { Server, Socket } from 'node:net'; | ||
import { c as TransportClientId } from '../../../index-ea74cdbb.js'; | ||
import { U as UdsConnection } from '../../../connection-99a67d3e.js'; | ||
import { S as ServerTransport } from '../../../server-3740c5d9.js'; | ||
import { c as ProvidedServerTransportOptions } from '../../../handshake-75d0124f.js'; | ||
import { U as UdsConnection } from '../../../connection-bd35d442.js'; | ||
import { S as ServerTransport } from '../../../server-53cd5b7e.js'; | ||
import { c as ProvidedServerTransportOptions } from '../../../handshake-a947c234.js'; | ||
import '@sinclair/typebox/value'; | ||
@@ -7,0 +7,0 @@ import '@sinclair/typebox'; |
import { | ||
ServerTransport | ||
} from "../../../chunk-MQCGG6KL.js"; | ||
} from "../../../chunk-RJOWZIWB.js"; | ||
import { | ||
UdsConnection | ||
} from "../../../chunk-UDXM64QK.js"; | ||
import "../../../chunk-WN77AT67.js"; | ||
} from "../../../chunk-AVL32IMG.js"; | ||
import "../../../chunk-J6N6H2WU.js"; | ||
import "../../../chunk-6LCL2ZZF.js"; | ||
import "../../../chunk-YXDAOVP7.js"; | ||
import "../../../chunk-TXSQRTZB.js"; | ||
import "../../../chunk-MW5JXLHY.js"; | ||
import "../../../chunk-R2HAS3GM.js"; | ||
import "../../../chunk-4PVU7J25.js"; | ||
@@ -12,0 +12,0 @@ |
@@ -1,5 +0,5 @@ | ||
import { C as ClientTransport } from '../../../client-0926d3d6.js'; | ||
import { C as ClientTransport } from '../../../client-5776a6bb.js'; | ||
import { c as TransportClientId } from '../../../index-ea74cdbb.js'; | ||
import { b as ProvidedClientTransportOptions } from '../../../handshake-75d0124f.js'; | ||
import { W as WebSocketConnection } from '../../../connection-d738cc08.js'; | ||
import { b as ProvidedClientTransportOptions } from '../../../handshake-a947c234.js'; | ||
import { W as WebSocketConnection } from '../../../connection-df85db7e.js'; | ||
import { W as WsLike } from '../../../wslike-e0b32dd5.js'; | ||
@@ -6,0 +6,0 @@ import '@sinclair/typebox/value'; |
import { | ||
WebSocketConnection | ||
} from "../../../chunk-R47IZD67.js"; | ||
} from "../../../chunk-7MJYOL32.js"; | ||
import { | ||
ClientTransport | ||
} from "../../../chunk-JA7XGTAL.js"; | ||
import "../../../chunk-WN77AT67.js"; | ||
} from "../../../chunk-DPKOJQWF.js"; | ||
import "../../../chunk-J6N6H2WU.js"; | ||
import "../../../chunk-6LCL2ZZF.js"; | ||
import "../../../chunk-YXDAOVP7.js"; | ||
import "../../../chunk-TXSQRTZB.js"; | ||
import "../../../chunk-MW5JXLHY.js"; | ||
import "../../../chunk-R2HAS3GM.js"; | ||
import "../../../chunk-4PVU7J25.js"; | ||
@@ -12,0 +12,0 @@ |
import { c as TransportClientId } from '../../../index-ea74cdbb.js'; | ||
import { WebSocketServer } from 'ws'; | ||
import { W as WebSocketConnection } from '../../../connection-d738cc08.js'; | ||
import { W as WebSocketConnection } from '../../../connection-df85db7e.js'; | ||
import { W as WsLike } from '../../../wslike-e0b32dd5.js'; | ||
import { S as ServerTransport } from '../../../server-3740c5d9.js'; | ||
import { c as ProvidedServerTransportOptions } from '../../../handshake-75d0124f.js'; | ||
import { S as ServerTransport } from '../../../server-53cd5b7e.js'; | ||
import { c as ProvidedServerTransportOptions } from '../../../handshake-a947c234.js'; | ||
import '@sinclair/typebox/value'; | ||
@@ -8,0 +8,0 @@ import '@sinclair/typebox'; |
import { | ||
ServerTransport | ||
} from "../../../chunk-MQCGG6KL.js"; | ||
} from "../../../chunk-RJOWZIWB.js"; | ||
import { | ||
WebSocketConnection | ||
} from "../../../chunk-R47IZD67.js"; | ||
import "../../../chunk-WN77AT67.js"; | ||
} from "../../../chunk-7MJYOL32.js"; | ||
import "../../../chunk-J6N6H2WU.js"; | ||
import "../../../chunk-6LCL2ZZF.js"; | ||
import "../../../chunk-YXDAOVP7.js"; | ||
import "../../../chunk-TXSQRTZB.js"; | ||
import "../../../chunk-MW5JXLHY.js"; | ||
import "../../../chunk-R2HAS3GM.js"; | ||
import "../../../chunk-4PVU7J25.js"; | ||
@@ -12,0 +12,0 @@ |
@@ -1,4 +0,4 @@ | ||
export { b as ClientTransportOptions, C as Connection, e as EventHandler, E as EventMap, d as EventTypes, f as ProtocolError, g as ProtocolErrorType, c as ServerTransportOptions, S as Session, T as Transport, P as TransportOptions, a as TransportStatus } from '../handshake-75d0124f.js'; | ||
export { C as ClientTransport } from '../client-0926d3d6.js'; | ||
export { S as ServerTransport } from '../server-3740c5d9.js'; | ||
export { b as ClientTransportOptions, C as Connection, e as EventHandler, E as EventMap, d as EventTypes, f as ProtocolError, g as ProtocolErrorType, c as ServerTransportOptions, S as Session, T as Transport, P as TransportOptions, a as TransportStatus } from '../handshake-a947c234.js'; | ||
export { C as ClientTransport } from '../client-5776a6bb.js'; | ||
export { S as ServerTransport } from '../server-53cd5b7e.js'; | ||
export { b as OpaqueTransportMessage, O as OpaqueTransportMessageSchema, c as TransportClientId, a as TransportMessage, T as TransportMessageSchema, d as isStreamClose, i as isStreamOpen } from '../index-ea74cdbb.js'; | ||
@@ -5,0 +5,0 @@ import '../types-3e5768ec.js'; |
import { | ||
ServerTransport | ||
} from "../chunk-MQCGG6KL.js"; | ||
} from "../chunk-RJOWZIWB.js"; | ||
import { | ||
ClientTransport | ||
} from "../chunk-JA7XGTAL.js"; | ||
} from "../chunk-DPKOJQWF.js"; | ||
import { | ||
ProtocolError, | ||
Transport | ||
} from "../chunk-WN77AT67.js"; | ||
} from "../chunk-J6N6H2WU.js"; | ||
import "../chunk-6LCL2ZZF.js"; | ||
@@ -15,7 +15,7 @@ import { | ||
Session | ||
} from "../chunk-YXDAOVP7.js"; | ||
} from "../chunk-MW5JXLHY.js"; | ||
import { | ||
OpaqueTransportMessageSchema, | ||
TransportMessageSchema | ||
} from "../chunk-TXSQRTZB.js"; | ||
} from "../chunk-R2HAS3GM.js"; | ||
import "../chunk-4PVU7J25.js"; | ||
@@ -22,0 +22,0 @@ export { |
import { Static } from '@sinclair/typebox'; | ||
import { P as PayloadType, R as RiverError, a as Procedure, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../services-75e84a9f.js'; | ||
import { P as PayloadType, R as RiverError, a as Procedure, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../services-38b3f758.js'; | ||
import { T as Transport, C as Connection, h as SessionOptions, S as Session, i as ServiceContext } from '../handshake-a947c234.js'; | ||
import * as it_pushable from 'it-pushable'; | ||
import { P as PartialTransportMessage, b as OpaqueTransportMessage } from '../index-ea74cdbb.js'; | ||
import { T as Transport, C as Connection, h as SessionOptions, S as Session, i as ServiceContext } from '../handshake-75d0124f.js'; | ||
import NodeWs from 'ws'; | ||
@@ -10,6 +10,6 @@ import http from 'node:http'; | ||
import { W as WsLike } from '../wslike-e0b32dd5.js'; | ||
import '../client-0926d3d6.js'; | ||
import '../client-5776a6bb.js'; | ||
import '../types-3e5768ec.js'; | ||
import '@sinclair/typebox/value'; | ||
import '@opentelemetry/api'; | ||
import '../types-3e5768ec.js'; | ||
@@ -16,0 +16,0 @@ /** |
@@ -5,10 +5,10 @@ import { | ||
pushable | ||
} from "../chunk-LTSLICON.js"; | ||
} from "../chunk-EV5HW4IC.js"; | ||
import { | ||
Session, | ||
defaultTransportOptions | ||
} from "../chunk-YXDAOVP7.js"; | ||
} from "../chunk-MW5JXLHY.js"; | ||
import { | ||
coerceErrorString | ||
} from "../chunk-TXSQRTZB.js"; | ||
} from "../chunk-R2HAS3GM.js"; | ||
import "../chunk-4PVU7J25.js"; | ||
@@ -15,0 +15,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.23.16", | ||
"version": "0.23.18", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "exports": { |
@@ -83,3 +83,3 @@ # River | ||
```ts | ||
import { ServicaSchema, Procedure, Ok } from '@replit/river'; | ||
import { ServiceSchema, Procedure, Ok } from '@replit/river'; | ||
import { Type } from '@sinclair/typebox'; | ||
@@ -138,3 +138,3 @@ | ||
import { createClient } from '@replit/river'; | ||
import type ServiceSurface from './server'; | ||
import { WebSocket } from 'ws'; | ||
@@ -146,6 +146,6 @@ const transport = new WebSocketClientTransport( | ||
const client = createClient<ServiceSurface>( | ||
const client = createClient( | ||
transport, | ||
'SERVER', // transport id of the server in the previous step | ||
true, // whether to eagerly connect to the server on creation (optional argument) | ||
{ eagerlyConnect: true }, // whether to eagerly connect to the server on creation (optional argument) | ||
); | ||
@@ -152,0 +152,0 @@ |
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
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
1546725
16438