koatty_core
Advanced tools
Comparing version 1.2.21 to 1.2.22
@@ -5,2 +5,4 @@ # Changelog | ||
### [1.2.22](https://github.com/koatty/koatty_core/compare/v1.2.2...v1.2.22) (2021-11-17) | ||
### [1.2.2](https://github.com/koatty/koatty_core/compare/v1.1.4...v1.2.2) (2021-11-12) | ||
@@ -7,0 +9,0 @@ |
@@ -108,2 +108,3 @@ /** | ||
env: string; | ||
version: string; | ||
tracer: any; | ||
@@ -110,0 +111,0 @@ options: InitOptions; |
@@ -5,4 +5,4 @@ /// <reference types="node" /> | ||
import { GrpcStatusCode, HttpStatusCode } from "koatty_exception"; | ||
import { sendUnaryData, ServerDuplexStream, ServerReadableStream, ServerUnaryCall, ServerUnaryCallImpl, ServerWritableStream } from "@grpc/grpc-js/build/src/server-call"; | ||
import { Metadata } from "@grpc/grpc-js"; | ||
import { Metadata, ServerDuplexStream, ServerReadableStream, ServerUnaryCall, ServerWritableStream } from "@grpc/grpc-js"; | ||
import { sendUnaryData, ServerUnaryCallImpl } from "@grpc/grpc-js/build/src/server-call"; | ||
export declare type IRpcServerUnaryCall<RequestType, ResponseType> = ServerUnaryCall<RequestType, ResponseType>; | ||
@@ -13,3 +13,3 @@ export declare type IRpcServerReadableStream<RequestType, ResponseType> = ServerReadableStream<RequestType, ResponseType>; | ||
export declare type IRpcServerCall<RequestType, ResponseType> = IRpcServerUnaryCall<RequestType, ResponseType> | IRpcServerReadableStream<RequestType, ResponseType> | IRpcServerWriteableStream<RequestType, ResponseType> | IRpcServerDuplexStream<RequestType, ResponseType>; | ||
export declare type IRpcServerUnaryCallImpl<RequestType, ResponseType> = ServerUnaryCallImpl<RequestType, ResponseType>; | ||
export declare type IRpcServerCallImpl<RequestType, ResponseType> = ServerUnaryCallImpl<RequestType, ResponseType>; | ||
export declare type IRpcServerCallback<ResponseType> = sendUnaryData<ResponseType>; | ||
@@ -36,5 +36,11 @@ /** | ||
status: HttpStatusCode | GrpcStatusCode; | ||
cancelled?: boolean; | ||
metadata: Metadata; | ||
/** | ||
* gRPC ServerCallImpl | ||
* | ||
* @type {IRpcServerCallImpl} | ||
* @memberof KoattyContext | ||
*/ | ||
call?: IRpcServerCall<any, any>; | ||
/** | ||
* websocket instance | ||
@@ -94,3 +100,3 @@ * | ||
*/ | ||
export declare function CreateGrpcContext(ctx: KoattyContext, call: IRpcServerUnaryCallImpl<any, any>): KoattyContext; | ||
export declare function CreateGrpcContext(ctx: KoattyContext, call: IRpcServerUnaryCall<any, any>): KoattyContext; | ||
/** | ||
@@ -97,0 +103,0 @@ * Create KoattyWsContext |
@@ -64,3 +64,3 @@ "use strict"; | ||
}; | ||
ctx.body = call.request; | ||
ctx.call = call; | ||
ctx.setMetaData("_body", call.request); | ||
@@ -79,3 +79,2 @@ return ctx; | ||
function CreateWsContext(ctx, data) { | ||
ctx.body = data; | ||
ctx.setMetaData("_body", data); | ||
@@ -82,0 +81,0 @@ return ctx; |
{ | ||
"name": "koatty_core", | ||
"version": "1.2.21", | ||
"version": "1.2.22", | ||
"description": "Koatty routing component, adapt to http1/2, websocket, gRPC.", | ||
@@ -65,2 +65,2 @@ "scripts": { | ||
} | ||
} | ||
} |
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
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
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
2096210
842