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

koatty_core

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koatty_core - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

11

dist/GrpcContext.d.ts
/// <reference types="node" />
import EventEmitter from "events";
import { Metadata, MetadataValue, status } from "@grpc/grpc-js";
import { Metadata, status } from "@grpc/grpc-js";
import { sendUnaryData, ServerDuplexStream, ServerReadableStream, ServerUnaryCall, ServerWritableStream } from "@grpc/grpc-js/build/src/server-call";

@@ -28,7 +28,2 @@ import { GrpcStatusCode } from "koatty_trace";

/**
* Creates an instance of KoattyGrpcContext.
* @memberof KoattyGrpcContext
*/
constructor();
/**
* throw Exception

@@ -50,3 +45,3 @@ *

*/
getMetaData(key: string): MetadataValue[];
getMetaData(key: string): import("@grpc/grpc-js").MetadataValue | import("@grpc/grpc-js").MetadataValue[];
/**

@@ -60,3 +55,3 @@ * setMetaData

*/
setMetaData(key: string, value: MetadataValue): any;
setMetaData(key: string, value: string | Buffer): any;
}

@@ -63,0 +58,0 @@ /**

@@ -10,3 +10,3 @@ "use strict";

* @Date: 2021-11-16 14:46:22
* @LastEditTime: 2021-11-16 21:17:23
* @LastEditTime: 2021-11-17 01:04:39
*/

@@ -24,15 +24,2 @@ const events_1 = tslib_1.__importDefault(require("events"));

class KoattyGrpcContext extends events_1.default {
/**
* Creates an instance of KoattyGrpcContext.
* @memberof KoattyGrpcContext
*/
constructor() {
super();
Reflect.defineProperty(this, '_caches', {
value: {},
writable: true,
configurable: false,
enumerable: false,
});
}
throw(message, code, status) {

@@ -59,3 +46,7 @@ if (typeof message !== "string") {

getMetaData(key) {
return this.metadata.get(key);
const value = this.metadata.get(key);
if (value.length === 1) {
return value[0];
}
return value;
}

@@ -62,0 +53,0 @@ /**

{
"name": "koatty_core",
"version": "1.2.4",
"version": "1.2.5",
"description": "Koatty routing component, adapt to http1/2, websocket, gRPC.",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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