@trpc/server
Advanced tools
Comparing version 11.0.0-rc.551 to 11.0.0-rc.552
{ | ||
"bundleSize": 136668, | ||
"bundleOrigSize": 186211, | ||
"bundleReduction": 26.61, | ||
"bundleOrigSize": 186605, | ||
"bundleReduction": 26.76, | ||
"modules": [ | ||
@@ -106,3 +106,3 @@ { | ||
"size": 5795, | ||
"origSize": 15690, | ||
"origSize": 16084, | ||
"renderedExports": [ | ||
@@ -117,3 +117,3 @@ "createBuilder" | ||
"percent": 4.24, | ||
"reduction": 63.07 | ||
"reduction": 63.97 | ||
}, | ||
@@ -211,5 +211,5 @@ { | ||
"/src/unstable-core-do-not-import.ts", | ||
"/src/unstable-core-do-not-import/http/resolveResponse.ts", | ||
"/src/unstable-core-do-not-import/initTRPC.ts", | ||
"/src/unstable-core-do-not-import/router.ts" | ||
"/src/unstable-core-do-not-import/router.ts", | ||
"/src/unstable-core-do-not-import/http/resolveResponse.ts" | ||
], | ||
@@ -338,6 +338,6 @@ "percent": 2.01, | ||
"/src/unstable-core-do-not-import.ts", | ||
"/src/unstable-core-do-not-import/middleware.ts", | ||
"/src/unstable-core-do-not-import/router.ts", | ||
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts", | ||
"/src/unstable-core-do-not-import/http/resolveResponse.ts", | ||
"/src/unstable-core-do-not-import/middleware.ts", | ||
"/src/unstable-core-do-not-import/router.ts", | ||
"/src/unstable-core-do-not-import/http/contentType.ts", | ||
@@ -399,4 +399,4 @@ "/src/unstable-core-do-not-import/procedureBuilder.ts", | ||
"/src/unstable-core-do-not-import.ts", | ||
"/src/unstable-core-do-not-import/http/resolveResponse.ts", | ||
"/src/unstable-core-do-not-import/error/getErrorShape.ts" | ||
"/src/unstable-core-do-not-import/error/getErrorShape.ts", | ||
"/src/unstable-core-do-not-import/http/resolveResponse.ts" | ||
], | ||
@@ -437,5 +437,2 @@ "percent": 1.05, | ||
"/src/unstable-core-do-not-import.ts", | ||
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts", | ||
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts", | ||
"/src/unstable-core-do-not-import/http/resolveResponse.ts", | ||
"/src/unstable-core-do-not-import/error/TRPCError.ts", | ||
@@ -445,2 +442,5 @@ "/src/unstable-core-do-not-import/transformer.ts", | ||
"/src/unstable-core-do-not-import/router.ts", | ||
"/src/unstable-core-do-not-import/http/getHTTPStatusCode.ts", | ||
"/src/unstable-core-do-not-import/http/parseConnectionParams.ts", | ||
"/src/unstable-core-do-not-import/http/resolveResponse.ts", | ||
"/src/unstable-core-do-not-import/rpc/parseTRPCMessage.ts", | ||
@@ -737,2 +737,12 @@ "/src/unstable-core-do-not-import/http/contentType.ts", | ||
{ | ||
"id": "/src/index.ts", | ||
"size": 0, | ||
"origSize": 32, | ||
"renderedExports": [], | ||
"removedExports": [], | ||
"dependents": [], | ||
"percent": 0, | ||
"reduction": 100 | ||
}, | ||
{ | ||
"id": "/src/http.ts", | ||
@@ -750,5 +760,5 @@ "size": 0, | ||
{ | ||
"id": "/src/index.ts", | ||
"id": "/src/rpc.ts", | ||
"size": 0, | ||
"origSize": 32, | ||
"origSize": 36, | ||
"renderedExports": [], | ||
@@ -771,12 +781,2 @@ "removedExports": [], | ||
{ | ||
"id": "/src/rpc.ts", | ||
"size": 0, | ||
"origSize": 36, | ||
"renderedExports": [], | ||
"removedExports": [], | ||
"dependents": [], | ||
"percent": 0, | ||
"reduction": 100 | ||
}, | ||
{ | ||
"id": "/src/unstable-core-do-not-import.ts", | ||
@@ -783,0 +783,0 @@ "size": 0, |
@@ -1,2 +0,2 @@ | ||
import type { inferObservableValue } from '../observable'; | ||
import type { inferObservableValue, Observable } from '../observable'; | ||
import type { AnyMiddlewareFunction, MiddlewareBuilder, MiddlewareFunction } from './middleware'; | ||
@@ -11,9 +11,2 @@ import type { inferParser, Parser } from './parser'; | ||
type inferSubscriptionOutput<TOutput> = TOutput extends AsyncIterable<infer $Output> ? inferTrackedOutput<$Output> : inferObservableValue<TOutput>; | ||
type inferSubscriptionProcedure<TInputIn, TOutputOut, $Output> = DefaultValue<TOutputOut, $Output> extends AsyncIterable<any> ? SubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: inferSubscriptionOutput<DefaultValue<TOutputOut, $Output>>; | ||
}> : LegacyObservableSubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: DefaultValue<TOutputOut, inferSubscriptionOutput<$Output>>; | ||
}>; | ||
export type CallerOverride<TContext> = (opts: { | ||
@@ -117,6 +110,18 @@ args: unknown[]; | ||
* Subscription procedure | ||
* @see https://trpc.io/docs/v11/concepts#vocabulary | ||
* @see https://trpc.io/docs/v11/server/subscriptions | ||
*/ | ||
subscription<$Output>(resolver: ProcedureResolver<TContext, TMeta, TContextOverrides, TInputOut, TOutputIn, $Output>): TCaller extends true ? TypeError<'Not implemented'> : inferSubscriptionProcedure<TInputIn, TOutputOut, $Output>; | ||
subscription<$Output extends AsyncGenerator<any, void, any>>(resolver: ProcedureResolver<TContext, TMeta, TContextOverrides, TInputOut, TOutputIn, $Output>): TCaller extends true ? TypeError<'Not implemented'> : SubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: inferSubscriptionOutput<DefaultValue<TOutputOut, $Output>>; | ||
}>; | ||
/** | ||
* @deprecated Using subscriptions with an observable is deprecated. Use an async generator instead. | ||
* This feature will be removed in v12 of tRPC. | ||
* @see https://trpc.io/docs/v11/server/subscriptions | ||
*/ | ||
subscription<$Output extends Observable<any, any>>(resolver: ProcedureResolver<TContext, TMeta, TContextOverrides, TInputOut, TOutputIn, $Output>): TCaller extends true ? TypeError<'Not implemented'> : LegacyObservableSubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: inferObservableValue<DefaultValue<TOutputOut, $Output>>; | ||
}>; | ||
/** | ||
* Overrides the way a procedure is invoked | ||
@@ -123,0 +128,0 @@ * Do not use this unless you know what you're doing - this is an experimental API |
{ | ||
"name": "@trpc/server", | ||
"version": "11.0.0-rc.551+33a3515c1", | ||
"version": "11.0.0-rc.552+268308497", | ||
"description": "The tRPC server library", | ||
@@ -152,3 +152,3 @@ "author": "KATT", | ||
], | ||
"gitHead": "33a3515c12fbf14105362278d42d32f92ef22740" | ||
"gitHead": "268308497fef646ca5e322b49d1503cd47392871" | ||
} |
@@ -1,2 +0,2 @@ | ||
import type { inferObservableValue } from '../observable'; | ||
import type { inferObservableValue, Observable } from '../observable'; | ||
import { getTRPCErrorFromUnknown, TRPCError } from './error/TRPCError'; | ||
@@ -53,15 +53,2 @@ import type { | ||
type inferSubscriptionProcedure<TInputIn, TOutputOut, $Output> = DefaultValue< | ||
TOutputOut, | ||
$Output | ||
> extends AsyncIterable<any> | ||
? SubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: inferSubscriptionOutput<DefaultValue<TOutputOut, $Output>>; | ||
}> | ||
: LegacyObservableSubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: DefaultValue<TOutputOut, inferSubscriptionOutput<$Output>>; | ||
}>; | ||
export type CallerOverride<TContext> = (opts: { | ||
@@ -360,5 +347,5 @@ args: unknown[]; | ||
* Subscription procedure | ||
* @see https://trpc.io/docs/v11/concepts#vocabulary | ||
* @see https://trpc.io/docs/v11/server/subscriptions | ||
*/ | ||
subscription<$Output>( | ||
subscription<$Output extends AsyncGenerator<any, void, any>>( | ||
resolver: ProcedureResolver< | ||
@@ -374,5 +361,27 @@ TContext, | ||
? TypeError<'Not implemented'> | ||
: inferSubscriptionProcedure<TInputIn, TOutputOut, $Output>; | ||
: SubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: inferSubscriptionOutput<DefaultValue<TOutputOut, $Output>>; | ||
}>; | ||
/** | ||
* @deprecated Using subscriptions with an observable is deprecated. Use an async generator instead. | ||
* This feature will be removed in v12 of tRPC. | ||
* @see https://trpc.io/docs/v11/server/subscriptions | ||
*/ | ||
subscription<$Output extends Observable<any, any>>( | ||
resolver: ProcedureResolver< | ||
TContext, | ||
TMeta, | ||
TContextOverrides, | ||
TInputOut, | ||
TOutputIn, | ||
$Output | ||
>, | ||
): TCaller extends true | ||
? TypeError<'Not implemented'> | ||
: LegacyObservableSubscriptionProcedure<{ | ||
input: DefaultValue<TInputIn, void>; | ||
output: inferObservableValue<DefaultValue<TOutputOut, $Output>>; | ||
}>; | ||
/** | ||
* Overrides the way a procedure is invoked | ||
@@ -484,3 +493,3 @@ * Do not use this unless you know what you're doing - this is an experimental API | ||
}, | ||
subscription(resolver) { | ||
subscription(resolver: ProcedureResolver<any, any, any, any, any, any>) { | ||
return createResolver({ ..._def, type: 'subscription' }, resolver) as any; | ||
@@ -487,0 +496,0 @@ }, |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
725506
18890
13