@replit/river
Advanced tools
Comparing version 0.16.1 to 0.16.2
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-f0226890.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-f0226890.js'; | ||
import { S as ServerTransport, C as Connection, a as ClientTransport, b as TransportClientId } from '../index-2e402bb8.js'; | ||
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-d295c1a5.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-d295c1a5.js'; | ||
import { S as ServerTransport, C as Connection, a as ClientTransport, b as TransportClientId } from '../index-c9e9977f.js'; | ||
import { Pushable } from 'it-pushable'; | ||
@@ -384,2 +384,6 @@ import '../types-3e5768ec.js'; | ||
}; | ||
interface ClientOptions { | ||
connectOnInvoke: boolean; | ||
eagerlyConnect: boolean; | ||
} | ||
/** | ||
@@ -398,4 +402,4 @@ * Creates a client for a given server using the provided transport. | ||
*/ | ||
declare const createClient: <Srv extends Server<ServiceSchemaMap>>(transport: ClientTransport<Connection>, serverId: TransportClientId, eagerlyConnect?: boolean) => ServerClient<Srv>; | ||
declare const createClient: <Srv extends Server<ServiceSchemaMap>>(transport: ClientTransport<Connection>, serverId: TransportClientId, providedClientOptions?: Partial<ClientOptions>) => ServerClient<Srv>; | ||
export { PayloadType, ProcErrors, ProcHandler, ProcInit, ProcInput, ProcOutput, ProcType, ProcedureMap, Result, RiverError, RiverUncaughtSchema, Server, ServerClient, Service, ServiceConfiguration, ServiceContext, ServiceSchema, createClient, createServer }; |
@@ -10,3 +10,3 @@ import { | ||
createServer | ||
} from "../chunk-Q6WPGM3K.js"; | ||
} from "../chunk-SKH3JYHN.js"; | ||
import "../chunk-GFRAOY75.js"; | ||
@@ -13,0 +13,0 @@ import "../chunk-H4BYJELI.js"; |
@@ -1,3 +0,3 @@ | ||
import { a as ClientTransport, c as ProvidedClientTransportOptions, b as TransportClientId } from '../../../index-2e402bb8.js'; | ||
import { U as UdsConnection } from '../../../connection-94896f3b.js'; | ||
import { a as ClientTransport, c as ProvidedClientTransportOptions, b as TransportClientId } from '../../../index-c9e9977f.js'; | ||
import { U as UdsConnection } from '../../../connection-2db95d74.js'; | ||
import '../../../types-3e5768ec.js'; | ||
@@ -4,0 +4,0 @@ import '@sinclair/typebox'; |
import { | ||
UdsConnection | ||
} from "../../../chunk-L65XWBX2.js"; | ||
} from "../../../chunk-HZWCU4ZI.js"; | ||
import { | ||
ClientTransport | ||
} from "../../../chunk-7SPCAA6Q.js"; | ||
} from "../../../chunk-CJGD7CNG.js"; | ||
import "../../../chunk-GFRAOY75.js"; | ||
@@ -8,0 +8,0 @@ import { |
import { Server, Socket } from 'node:net'; | ||
import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-2e402bb8.js'; | ||
import { U as UdsConnection } from '../../../connection-94896f3b.js'; | ||
import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-c9e9977f.js'; | ||
import { U as UdsConnection } from '../../../connection-2db95d74.js'; | ||
import '../../../types-3e5768ec.js'; | ||
@@ -5,0 +5,0 @@ import '@sinclair/typebox'; |
import { | ||
UdsConnection | ||
} from "../../../chunk-L65XWBX2.js"; | ||
} from "../../../chunk-HZWCU4ZI.js"; | ||
import { | ||
ServerTransport | ||
} from "../../../chunk-7SPCAA6Q.js"; | ||
} from "../../../chunk-CJGD7CNG.js"; | ||
import "../../../chunk-GFRAOY75.js"; | ||
@@ -8,0 +8,0 @@ import { |
import WebSocket from 'isomorphic-ws'; | ||
import { a as ClientTransport, b as TransportClientId, c as ProvidedClientTransportOptions } from '../../../index-2e402bb8.js'; | ||
import { W as WebSocketConnection } from '../../../connection-99346822.js'; | ||
import { a as ClientTransport, b as TransportClientId, c as ProvidedClientTransportOptions } from '../../../index-c9e9977f.js'; | ||
import { W as WebSocketConnection } from '../../../connection-c97da681.js'; | ||
import '../../../types-3e5768ec.js'; | ||
@@ -5,0 +5,0 @@ import '@sinclair/typebox'; |
import { | ||
WebSocketConnection | ||
} from "../../../chunk-XLJGKNV2.js"; | ||
} from "../../../chunk-HKVP6XEL.js"; | ||
import { | ||
ClientTransport | ||
} from "../../../chunk-7SPCAA6Q.js"; | ||
} from "../../../chunk-CJGD7CNG.js"; | ||
import "../../../chunk-GFRAOY75.js"; | ||
@@ -8,0 +8,0 @@ import { |
@@ -1,5 +0,5 @@ | ||
import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-2e402bb8.js'; | ||
import { S as ServerTransport, b as TransportClientId, d as ProvidedTransportOptions } from '../../../index-c9e9977f.js'; | ||
import { WebSocketServer } from 'ws'; | ||
import { WebSocket } from 'isomorphic-ws'; | ||
import { W as WebSocketConnection } from '../../../connection-99346822.js'; | ||
import { W as WebSocketConnection } from '../../../connection-c97da681.js'; | ||
import '../../../types-3e5768ec.js'; | ||
@@ -6,0 +6,0 @@ import '@sinclair/typebox'; |
import { | ||
WebSocketConnection | ||
} from "../../../chunk-XLJGKNV2.js"; | ||
} from "../../../chunk-HKVP6XEL.js"; | ||
import { | ||
ServerTransport | ||
} from "../../../chunk-7SPCAA6Q.js"; | ||
} from "../../../chunk-CJGD7CNG.js"; | ||
import "../../../chunk-GFRAOY75.js"; | ||
@@ -8,0 +8,0 @@ import "../../../chunk-H4BYJELI.js"; |
@@ -1,3 +0,3 @@ | ||
export { a as ClientTransport, c as ClientTransportOptions, C as Connection, m as EventHandler, E as EventMap, l as EventTypes, O as OpaqueTransportMessage, h as OpaqueTransportMessageSchema, n as ProtocolError, o as ProtocolErrorType, S as ServerTransport, e as Session, T as Transport, b as TransportClientId, i as TransportMessage, g as TransportMessageSchema, d as TransportOptions, f as TransportStatus, k as isStreamClose, j as isStreamOpen } from '../index-2e402bb8.js'; | ||
export { a as ClientTransport, c as ClientTransportOptions, C as Connection, m as EventHandler, E as EventMap, l as EventTypes, O as OpaqueTransportMessage, h as OpaqueTransportMessageSchema, n as ProtocolError, o as ProtocolErrorType, S as ServerTransport, e as Session, T as Transport, b as TransportClientId, i as TransportMessage, g as TransportMessageSchema, d as TransportOptions, f as TransportStatus, k as isStreamClose, j as isStreamOpen } from '../index-c9e9977f.js'; | ||
import '../types-3e5768ec.js'; | ||
import '@sinclair/typebox'; |
@@ -9,3 +9,3 @@ import "../chunk-RPIDSIQG.js"; | ||
Transport | ||
} from "../chunk-7SPCAA6Q.js"; | ||
} from "../chunk-CJGD7CNG.js"; | ||
import { | ||
@@ -12,0 +12,0 @@ OpaqueTransportMessageSchema, |
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-f0226890.js'; | ||
import { P as PartialTransportMessage, T as Transport, C as Connection, O as OpaqueTransportMessage } from '../index-2e402bb8.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-d295c1a5.js'; | ||
import { P as PartialTransportMessage, T as Transport, C as Connection, O as OpaqueTransportMessage } from '../index-c9e9977f.js'; | ||
import * as it_pushable from 'it-pushable'; | ||
@@ -5,0 +5,0 @@ import { C as Codec } from '../types-3e5768ec.js'; |
import { | ||
UNCAUGHT_ERROR, | ||
pushable | ||
} from "../chunk-Q6WPGM3K.js"; | ||
} from "../chunk-SKH3JYHN.js"; | ||
import "../chunk-RPIDSIQG.js"; | ||
import { | ||
Session | ||
} from "../chunk-7SPCAA6Q.js"; | ||
} from "../chunk-CJGD7CNG.js"; | ||
import { | ||
@@ -10,0 +10,0 @@ coerceErrorString |
{ | ||
"name": "@replit/river", | ||
"description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!", | ||
"version": "0.16.1", | ||
"version": "0.16.2", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "exports": { |
@@ -25,8 +25,22 @@ # River | ||
1. **Ensure `"moduleResolution": "bundler"` in tsconfig.json**: | ||
1. **Ensure your `tsconfig.json` is configured correctly**: | ||
```json | ||
You must verify that: | ||
- `compilerOptions.moduleResolution` is set to `"bundler"` | ||
- `compilerOptions.strictFunctionTypes` is set to `true` | ||
- `compilerOptions.strictNullChecks` is set to `true` | ||
or, preferably, that: | ||
- `compilerOptions.moduleResolution` is set to `"bundler"` | ||
- `compilerOptions.strict` is set to `true` | ||
Like so: | ||
```jsonc | ||
{ | ||
"compilerOptions": { | ||
"moduleResolution": "bundler" | ||
"moduleResolution": "bundler", | ||
"strict": true | ||
// Other compiler options... | ||
@@ -37,17 +51,17 @@ } | ||
If it exists but is set to a different value, modify it to `"bundler"`. | ||
If these options already exist in your `tsconfig.json` and don't match what is shown above, modify them. River is designed for `"strict": true`, but technically only `strictFunctionTypes` and `strictNullChecks` being set to `true` is required. Failing to set these will cause unresolvable type errors when defining services. | ||
2. Install River and Dependencies: | ||
To use River, install the required packages using npm: | ||
To use River, install the required packages using npm: | ||
```bash | ||
npm i @replit/river @sinclair/typebox | ||
``` | ||
```bash | ||
npm i @replit/river @sinclair/typebox | ||
``` | ||
3. If you plan on using WebSocket for the underlying transport, also install | ||
```bash | ||
npm i ws isomorphic-ws | ||
``` | ||
```bash | ||
npm i ws isomorphic-ws | ||
``` | ||
@@ -54,0 +68,0 @@ ## Writing services |
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
399981
11410
221