Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@replit/river

Package Overview
Dependencies
Maintainers
31
Versions
162
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@replit/river - npm Package Compare versions

Comparing version 0.22.0 to 0.23.0

dist/chunk-DZOATC6M.js

2

dist/logging/index.d.ts

@@ -1,4 +0,4 @@

export { n as LogFn, L as Logger, M as MessageMetadata, m as bindLogger, k as coloredStringLogger, l as jsonLogger, s as stringLogger } from '../index-2ece5234.js';
export { q as LogFn, L as Logger, M as MessageMetadata, p as bindLogger, n as coloredStringLogger, o as jsonLogger, s as stringLogger } from '../index-a6fe0edd.js';
import '@sinclair/typebox';
import '../types-3e5768ec.js';
import '@opentelemetry/api';

@@ -1,7 +0,8 @@

import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError, S as ServiceContext } from '../services-cb01a7a8.js';
export { C as Client, E as Err, O as Ok, B as Output, k as ProcErrors, g as ProcHandler, h as ProcInit, i as ProcInput, j as ProcOutput, l as ProcType, a as Procedure, o as ProcedureMap, d as ProcedureResult, p as RPCProcedure, z as ResultUnwrapErr, y as ResultUnwrapOk, x as RiverErrorSchema, c as RiverUncaughtSchema, n as SerializedServerSchema, e as Service, f as ServiceConfiguration, u as ServiceContextWithState, v as ServiceContextWithTransportInfo, m as ServiceSchema, r as StreamProcedure, q as SubscriptionProcedure, w as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, t as createClient, s as serializeSchema } from '../services-cb01a7a8.js';
import { Static } from '@sinclair/typebox';
import { A as AnyServiceSchemaMap, I as InstantiatedServiceSchemaMap, P as PayloadType, b as Result, R as RiverError } from '../services-be91b485.js';
export { C as Client, E as Err, O as Ok, x as Output, j as ProcErrors, f as ProcHandler, g as ProcInit, h as ProcInput, i as ProcOutput, k as ProcType, a as Procedure, n as ProcedureMap, d as ProcedureResult, o as RPCProcedure, w as ResultUnwrapErr, v as ResultUnwrapOk, u as RiverErrorSchema, c as RiverUncaughtSchema, m as SerializedServerSchema, S as Service, e as ServiceConfiguration, l as ServiceSchema, q as StreamProcedure, p as SubscriptionProcedure, t as UNCAUGHT_ERROR, U as UploadProcedure, V as ValidProcType, r as createClient, s as serializeSchema } from '../services-be91b485.js';
import { Static, TSchema } from '@sinclair/typebox';
import { ServerTransport } from '../transport/index.js';
import { Pushable } from 'it-pushable';
import { C as Connection } from '../index-2ece5234.js';
import { C as Connection, c as ServerHandshakeOptions, a as ServiceContext } from '../index-a6fe0edd.js';
export { d as ServiceContextWithState, e as ServiceContextWithTransportInfo } from '../index-a6fe0edd.js';
import '../types-3e5768ec.js';

@@ -35,9 +36,13 @@ import '@opentelemetry/api';

* @param services - An object containing all the services to be registered on the server.
* @param handshakeOptions - An optional object containing additional handshake options to be passed to the transport.
* @param extendedContext - An optional object containing additional context to be passed to all services.
* @returns A promise that resolves to a server instance with the registered services.
*/
declare function createServer<Services extends AnyServiceSchemaMap>(transport: ServerTransport<Connection>, services: Services, extendedContext?: Omit<ServiceContext, 'state'>): Server<Services>;
declare function createServer<Services extends AnyServiceSchemaMap, MetadataSchema extends TSchema = TSchema>(transport: ServerTransport<Connection, MetadataSchema>, services: Services, providedServerOptions?: Partial<{
handshakeOptions?: ServerHandshakeOptions<MetadataSchema>;
extendedContext?: Omit<ServiceContext, 'state'>;
}>): Server<Services>;
var version = "0.22.0";
var version = "0.23.0";
export { PayloadType, version as RIVER_VERSION, Result, RiverError, Server, ServiceContext, createServer };

@@ -11,6 +11,6 @@ import {

serializeSchema
} from "../chunk-GCLEWC26.js";
} from "../chunk-VOJVLWVX.js";
import {
version
} from "../chunk-3MFX6NXA.js";
} from "../chunk-PCKHBAVP.js";
import "../chunk-OTQNCLFH.js";

@@ -17,0 +17,0 @@ export {

@@ -1,4 +0,4 @@

import { U as UdsConnection } from '../../../connection-bbfe1147.js';
import { U as UdsConnection } from '../../../connection-7582fb92.js';
import { ClientTransport, ClientTransportOptions as ProvidedClientTransportOptions } from '../../index.js';
import { T as TransportClientId } from '../../../index-2ece5234.js';
import { T as TransportClientId } from '../../../index-a6fe0edd.js';
import 'node:net';

@@ -5,0 +5,0 @@ import 'node:stream';

import {
UdsConnection
} from "../../../chunk-S3YKQT4J.js";
} from "../../../chunk-DZOATC6M.js";
import {
ClientTransport
} from "../../../chunk-ZPBWKBM5.js";
import "../../../chunk-3MFX6NXA.js";
} from "../../../chunk-MJUFKPBT.js";
import "../../../chunk-PCKHBAVP.js";
import {

@@ -9,0 +9,0 @@ log

import { Server, Socket } from 'node:net';
import { ServerTransport, ServerTransportOptions as ProvidedServerTransportOptions } from '../../index.js';
import { T as TransportClientId } from '../../../index-2ece5234.js';
import { U as UdsConnection } from '../../../connection-bbfe1147.js';
import { T as TransportClientId } from '../../../index-a6fe0edd.js';
import { U as UdsConnection } from '../../../connection-7582fb92.js';
import '../../../types-3e5768ec.js';

@@ -6,0 +6,0 @@ import '@sinclair/typebox';

import {
UdsConnection
} from "../../../chunk-S3YKQT4J.js";
} from "../../../chunk-DZOATC6M.js";
import {
ServerTransport
} from "../../../chunk-ZPBWKBM5.js";
import "../../../chunk-3MFX6NXA.js";
} from "../../../chunk-MJUFKPBT.js";
import "../../../chunk-PCKHBAVP.js";
import "../../../chunk-OTQNCLFH.js";

@@ -9,0 +9,0 @@ import "../../../chunk-3AW3IXVD.js";

import { ClientTransport, ClientTransportOptions as ProvidedClientTransportOptions } from '../../index.js';
import { T as TransportClientId } from '../../../index-2ece5234.js';
import { W as WebSocketConnection } from '../../../connection-8b059ac4.js';
import { T as TransportClientId } from '../../../index-a6fe0edd.js';
import { W as WebSocketConnection } from '../../../connection-5685d817.js';
import { W as WsLike } from '../../../wslike-e0b32dd5.js';

@@ -5,0 +5,0 @@ import '../../../types-3e5768ec.js';

import {
WebSocketConnection
} from "../../../chunk-HUBFYN37.js";
} from "../../../chunk-ZF2UFTNN.js";
import {
ClientTransport
} from "../../../chunk-ZPBWKBM5.js";
import "../../../chunk-3MFX6NXA.js";
} from "../../../chunk-MJUFKPBT.js";
import "../../../chunk-PCKHBAVP.js";
import {

@@ -9,0 +9,0 @@ log

@@ -1,5 +0,5 @@

import { T as TransportClientId } from '../../../index-2ece5234.js';
import { T as TransportClientId } from '../../../index-a6fe0edd.js';
import { ServerTransport, ServerTransportOptions as ProvidedServerTransportOptions } from '../../index.js';
import { WebSocketServer } from 'ws';
import { W as WebSocketConnection } from '../../../connection-8b059ac4.js';
import { W as WebSocketConnection } from '../../../connection-5685d817.js';
import { W as WsLike } from '../../../wslike-e0b32dd5.js';

@@ -6,0 +6,0 @@ import '@sinclair/typebox';

import {
WebSocketConnection
} from "../../../chunk-HUBFYN37.js";
} from "../../../chunk-ZF2UFTNN.js";
import {
ServerTransport
} from "../../../chunk-ZPBWKBM5.js";
import "../../../chunk-3MFX6NXA.js";
} from "../../../chunk-MJUFKPBT.js";
import "../../../chunk-PCKHBAVP.js";
import "../../../chunk-OTQNCLFH.js";

@@ -9,0 +9,0 @@ import "../../../chunk-3AW3IXVD.js";

import { C as Codec } from '../types-3e5768ec.js';
import { O as OpaqueTransportMessage, C as Connection, a as Session, T as TransportClientId, j as PropagationContext, P as PartialTransportMessage, S as SessionOptions, f as ClientHandshakeOptions, g as ServerHandshakeOptions } from '../index-2ece5234.js';
export { H as HandshakeRequestMetadata, d as OpaqueTransportMessageSchema, b as ParsedHandshakeMetadata, e as TransportMessage, c as TransportMessageSchema, h as isStreamClose, i as isStreamOpen } from '../index-2ece5234.js';
import '@sinclair/typebox';
import { O as OpaqueTransportMessage, C as Connection, b as Session, T as TransportClientId, l as PropagationContext, P as PartialTransportMessage, f as ClientHandshakeOptions, c as ServerHandshakeOptions, m as ParsedMetadata, S as SessionOptions } from '../index-a6fe0edd.js';
export { h as OpaqueTransportMessageSchema, i as TransportMessage, g as TransportMessageSchema, k as isStreamClose, j as isStreamOpen } from '../index-a6fe0edd.js';
import { TSchema } from '@sinclair/typebox';
import '@opentelemetry/api';

@@ -101,9 +101,5 @@

type ProvidedTransportOptions = Partial<TransportOptions>;
type ClientTransportOptions = TransportOptions & ConnectionRetryOptions & {
handshake?: ClientHandshakeOptions;
};
type ClientTransportOptions = TransportOptions & ConnectionRetryOptions;
type ProvidedClientTransportOptions = Partial<ClientTransportOptions>;
type ServerTransportOptions = TransportOptions & {
handshake?: ServerHandshakeOptions;
};
type ServerTransportOptions = TransportOptions;
type ProvidedServerTransportOptions = Partial<ServerTransportOptions>;

@@ -250,3 +246,3 @@ /**

}
declare abstract class ClientTransport<ConnType extends Connection> extends Transport<ConnType> {
declare abstract class ClientTransport<ConnType extends Connection, HandshakeMetadata extends TSchema = TSchema> extends Transport<ConnType> {
/**

@@ -268,3 +264,8 @@ * The options for this transport.

reconnectOnConnectionDrop: boolean;
/**
* Optional handshake options for this client.
*/
handshakeExtensions?: ClientHandshakeOptions<HandshakeMetadata>;
constructor(clientId: TransportClientId, providedOptions?: ProvidedClientTransportOptions);
extendHandshake(options: ClientHandshakeOptions<HandshakeMetadata>): void;
protected handleConnection(conn: ConnType, to: TransportClientId): void;

@@ -290,3 +291,3 @@ receiveHandshakeResponseMessage(data: Uint8Array, conn: ConnType): Session<ConnType> | false;

}
declare abstract class ServerTransport<ConnType extends Connection> extends Transport<ConnType> {
declare abstract class ServerTransport<ConnType extends Connection, CustomMetadataSchema extends TSchema = TSchema> extends Transport<ConnType> {
/**

@@ -296,4 +297,14 @@ * The options for this transport.

protected options: ServerTransportOptions;
/**
* Optional handshake options for the server.
*/
handshakeExtensions?: ServerHandshakeOptions<CustomMetadataSchema>;
/**
* A map of session handshake data for each session.
*/
sessionHandshakeMetadata: WeakMap<Session<ConnType>, ParsedMetadata>;
constructor(clientId: TransportClientId, providedOptions?: ProvidedServerTransportOptions);
extendHandshake(options: ServerHandshakeOptions<CustomMetadataSchema>): void;
protected handleConnection(conn: ConnType): void;
private validateHandshakeMetadata;
receiveHandshakeRequestMessage(data: Uint8Array, conn: ConnType): Promise<Session<ConnType> | false>;

@@ -300,0 +311,0 @@ }

@@ -8,7 +8,7 @@ import {

Transport
} from "../chunk-ZPBWKBM5.js";
} from "../chunk-MJUFKPBT.js";
import {
OpaqueTransportMessageSchema,
TransportMessageSchema
} from "../chunk-3MFX6NXA.js";
} from "../chunk-PCKHBAVP.js";
import "../chunk-OTQNCLFH.js";

@@ -15,0 +15,0 @@ import "../chunk-3AW3IXVD.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 '../services-cb01a7a8.js';
import { P as PayloadType, R as RiverError, a as Procedure, b as Result, c as RiverUncaughtSchema, d as ProcedureResult } from '../services-be91b485.js';
import { Transport } from '../transport/index.js';
import * as it_pushable from 'it-pushable';
import { P as PartialTransportMessage, C as Connection, O as OpaqueTransportMessage, S as SessionOptions, a as Session } from '../index-2ece5234.js';
import { P as PartialTransportMessage, C as Connection, O as OpaqueTransportMessage, S as SessionOptions, a as ServiceContext, b as Session } from '../index-a6fe0edd.js';
import NodeWs from 'ws';

@@ -7,0 +7,0 @@ import http from 'node:http';

@@ -5,10 +5,10 @@ import {

pushable
} from "../chunk-GCLEWC26.js";
} from "../chunk-VOJVLWVX.js";
import {
Session,
defaultTransportOptions
} from "../chunk-ZPBWKBM5.js";
} from "../chunk-MJUFKPBT.js";
import {
coerceErrorString
} from "../chunk-3MFX6NXA.js";
} from "../chunk-PCKHBAVP.js";
import "../chunk-OTQNCLFH.js";

@@ -98,3 +98,4 @@ import "../chunk-3AW3IXVD.js";

streamId: nanoid(),
session
session,
metadata: {}
};

@@ -101,0 +102,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.22.0",
"version": "0.23.0",
"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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc