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

@replit/river

Package Overview
Dependencies
Maintainers
29
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.2.2 to 0.3.0

dist/codec/index.d.ts

3

dist/__tests__/bandwidth.bench.js
import http from 'http';
import { bench, describe } from 'vitest';
import { createWebSocketServer, createWsTransports, onServerReady, waitForMessage, } from '../transport/util';
import { createWebSocketServer, createWsTransports, onServerReady, } from '../testUtils';
import largePayload from './largePayload.json';

@@ -9,2 +9,3 @@ import { TestServiceConstructor } from './integration.test';

import { StupidlyLargeService } from './typescript-stress.test';
import { waitForMessage } from '../transport';
let smallId = 0;

@@ -11,0 +12,0 @@ let largeId = 0;

@@ -21,3 +21,3 @@ export declare const EchoRequest: import("@sinclair/typebox").TObject<{

}>;
handler: (context: import("..").ServiceContextWithState<{
handler: (context: import("../router").ServiceContextWithState<{
count: number;

@@ -40,3 +40,3 @@ }>, input: import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{
handler: (context: import("../router").ServiceContextWithState<{
count: number;

@@ -43,0 +43,0 @@ }>, input: AsyncIterable<import("../transport/message").TransportMessage<{

@@ -6,6 +6,5 @@ import http from 'http';

import { afterAll, describe, expect, test } from 'vitest';
import { createWebSocketServer, createWsTransports, onServerReady, } from '../transport/util';
import { createWebSocketServer, createWsTransports, onServerReady, asClientRpc, asClientStream, } from '../testUtils';
import { createServer } from '../router/server';
import { createClient } from '../router/client';
import { asClientRpc, asClientStream } from '../router/server.util';
export const EchoRequest = Type.Object({

@@ -12,0 +11,0 @@ msg: Type.String(),

@@ -14,3 +14,3 @@ import { MessageId, OpaqueTransportMessage } from '../transport/message';

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -30,3 +30,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -46,3 +46,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -62,3 +62,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -78,3 +78,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -94,3 +94,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -110,3 +110,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -126,3 +126,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -142,3 +142,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -158,3 +158,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -174,3 +174,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -190,3 +190,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -206,3 +206,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -222,3 +222,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -238,3 +238,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -254,3 +254,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -270,3 +270,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -286,3 +286,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -302,3 +302,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -318,3 +318,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -334,3 +334,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -350,3 +350,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -366,3 +366,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -382,3 +382,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -398,3 +398,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -414,3 +414,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -430,3 +430,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -446,3 +446,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -462,3 +462,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -478,3 +478,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -494,3 +494,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -510,3 +510,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -526,3 +526,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -542,3 +542,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -558,3 +558,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -574,3 +574,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -590,3 +590,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -606,3 +606,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -622,3 +622,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -638,3 +638,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -654,3 +654,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -670,3 +670,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -686,3 +686,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -702,3 +702,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -718,3 +718,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -734,3 +734,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -750,3 +750,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -766,3 +766,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -782,3 +782,3 @@ }>) => Promise<import("../transport/message").TransportMessage<{

}>;
handler: (context: import("..").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
handler: (context: import("../router").ServiceContextWithState<{}>, input: import("../transport/message").TransportMessage<{
a: number;

@@ -785,0 +785,0 @@ }>) => Promise<import("../transport/message").TransportMessage<{

import { pushable } from 'it-pushable';
import { msg } from '../transport/message';
import { waitForMessage } from '../transport/util';
import { waitForMessage } from '../transport';
const noop = () => { };

@@ -5,0 +5,0 @@ function _createRecursiveProxy(callback, path) {

@@ -5,6 +5,15 @@ {

"description": "It's like tRPC but... with JSON Schema Support, duplex streaming and support for service multiplexing. Transport agnostic!",
"version": "0.2.2",
"version": "0.3.0",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"exports": {
".": "./dist/router/index.js",
"./logging": "./dist/logging/index.js",
"./codec": "./dist/codec/index.js",
"./test-util": "./dist/testUtils.js",
"./package.json": "./package.json",
"./transport": "./dist/transport/index.js",
"./transport/ws": "./dist/transport/impls/ws.js",
"./transport/stdio": "./dist/transport/impls/stdio.js"
},
"files": [

@@ -25,3 +34,3 @@ "dist"

"typescript": "^5.2.2",
"vitest": "^0.34.3"
"vitest": "^0.34.6"
},

@@ -28,0 +37,0 @@ "scripts": {

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