@trpc/server
Advanced tools
Comparing version 1.5.0 to 2.0.0-alpha.0
@@ -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" | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
26
1
2
44161
8
951