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

@trpc/server

Package Overview
Dependencies
Maintainers
2
Versions
1072
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trpc/server - npm Package Compare versions

Comparing version 1.5.0 to 2.0.0-alpha.0

dist/adapters/express.js

2

dist/adapters/express.d.ts

@@ -1,2 +0,2 @@

import * as express from 'express';
import type * as express from 'express';
import { BaseOptions, CreateContextFn, CreateContextFnOptions } from '../http';

@@ -3,0 +3,0 @@ import { Router } from '../router';

@@ -1,2 +0,2 @@

import { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
import type { NextApiHandler, NextApiRequest, NextApiResponse } from 'next';
import { BaseOptions, CreateContextFn, CreateContextFnOptions } from '../http';

@@ -3,0 +3,0 @@ import { Router } from '../router';

@@ -0,0 +0,0 @@ /// <reference types="node" />

export declare function assertNotBrowser(): void;

@@ -0,0 +0,0 @@ export declare class InputValidationError<TError extends Error> extends Error {

@@ -16,3 +16,2 @@ /// <reference types="node" />

notFound: (message?: string | undefined) => HTTPError;
payloadTooLarge: (message?: string | undefined) => HTTPError;
};

@@ -19,0 +18,0 @@ export declare type HTTPSuccessResponseEnvelope<TOutput> = {

@@ -7,4 +7,2 @@ export * from './assertNotBrowser';

export * from './transformer';
export * from './adapters/express';
export * from './adapters/next';
export * from './adapters/standalone';

@@ -1,8 +0,10 @@

'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./server.cjs.production.min.js')
} else {
module.exports = require('./server.cjs.development.js')
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./assertNotBrowser"), exports);
tslib_1.__exportStar(require("./http"), exports);
tslib_1.__exportStar(require("./router"), exports);
tslib_1.__exportStar(require("./types"), exports);
tslib_1.__exportStar(require("./subscription"), exports);
tslib_1.__exportStar(require("./transformer"), exports);
tslib_1.__exportStar(require("./adapters/standalone"), exports);

@@ -28,3 +28,3 @@ import { Subscription } from './subscription';

export declare type inferRouteOutput<TRoute extends Route> = inferAsyncReturnType<TRoute['resolve']>;
export declare type inferSubscriptionOutput<TRouter extends AnyRouter, TPath extends keyof TRouter['_def']['subscriptions']> = TRouter[TPath] extends Subscription<infer TData> ? TData : never;
export declare type inferSubscriptionOutput<TRouter extends AnyRouter, TPath extends keyof TRouter['_def']['subscriptions']> = ReturnType<inferAsyncReturnType<TRouter['_def']['subscriptions'][TPath]['resolve']>['output']>;
export declare type inferHandlerFn<TRoutes extends RouteRecord<any, any, any>> = <TPath extends keyof TRoutes & string, TRoute extends TRoutes[TPath]>(path: TPath, ...args: TRoute extends RouteWithInput<any, any, any> ? [inferRouteInput<TRoute>] : [undefined?]) => Promise<inferRouteOutput<TRoutes[TPath]>>;

@@ -31,0 +31,0 @@ export declare type AnyRouter<TContext = any> = Router<TContext, any, any, any>;

@@ -31,4 +31,7 @@ /// <reference types="node" />

start(): Promise<void>;
onceOutputAndStop(): Promise<TOutput>;
/**
* This method is just here to help with `inferSubscriptionOutput` which I can't get working without it
*/
protected output(): TOutput;
/**
* Emit data

@@ -35,0 +38,0 @@ */

@@ -0,0 +0,0 @@ export declare type DataTransformer = {

@@ -0,0 +0,0 @@ export declare type Prefix<K extends string, T extends string> = `${K}${T}`;

{
"name": "@trpc/server",
"version": "1.5.0",
"version": "2.0.0-alpha.0",
"description": "TRPC Server",

@@ -18,4 +18,4 @@ "author": "KATT",

"scripts": {
"start": "tsdx watch --tsconfig tsconfig.build.json --verbose --noClean",
"build": "yarn tsdx build --tsconfig tsconfig.build.json",
"start": "yarn build --watch",
"build": "tsc --project tsconfig.build.json",
"test": "tsdx test",

@@ -44,6 +44,7 @@ "lint": "tsdx lint",

"ts-json-validator": "^0.7.1",
"typescript": "^4.1.4",
"yup": "^0.32.8",
"zod": "^1.11.11"
},
"gitHead": "ff3026c8cf47ea68878f57ec8fd41acd34b1879c"
"gitHead": "57c920df3cc78a212c5b159c059bb0f39184da96"
}
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