Socket
Socket
Sign inDemoInstall

protocat

Package Overview
Dependencies
37
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.0 to 0.6.1

3

dist/lib/call-types.js

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

*/
exports.stubToType = (s) => s.responseStream
const stubToType = (s) => s.responseStream
? s.requestStream

@@ -24,2 +24,3 @@ ? CallType.Bidi

: CallType.Unary;
exports.stubToType = stubToType;
//# sourceMappingURL=call-types.js.map

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

};
exports.createClient = (clientDef, address, creds, options) => {
const createClient = (clientDef, address, creds, options) => {
if ('prototype' in clientDef) {

@@ -94,2 +94,3 @@ const Client = clientDef;

};
exports.createClient = createClient;
//# sourceMappingURL=client.js.map

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

const grpc = require("@grpc/grpc-js");
exports.accessLogInterceptor = (fn) => (options, nextCall) => {
const accessLogInterceptor = (fn) => (options, nextCall) => {
return new grpc.InterceptingCall(nextCall(options), {

@@ -22,2 +22,3 @@ start: (metadata, _listener, next) => {

};
exports.accessLogInterceptor = accessLogInterceptor;
//# sourceMappingURL=access-log-interceptor.js.map

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

const grpc = require("@grpc/grpc-js");
exports.metadataInterceptor = (fn) => (options, nextCall) => {
const metadataInterceptor = (fn) => (options, nextCall) => {
return new grpc.InterceptingCall(nextCall(options), {

@@ -18,2 +18,3 @@ start: async (metadata, _listener, next) => {

};
exports.metadataInterceptor = metadataInterceptor;
//# sourceMappingURL=metadata-interceptor.js.map
import * as grpc from '@grpc/grpc-js';
/** Promise wrapper for callback tryShutdown */
export declare const tryShutdown: (server: grpc.Server) => Promise<unknown>;
export declare const tryShutdown: (server: grpc.Server) => Promise<void>;
/** Promise wrapper for callback bindAsync */

@@ -5,0 +5,0 @@ export declare const bindAsync: (server: grpc.Server, address: string, creds: grpc.ServerCredentials) => Promise<number>;

@@ -5,6 +5,8 @@ "use strict";

/** Promise wrapper for callback tryShutdown */
exports.tryShutdown = (server) => new Promise((resolve, reject) => server.tryShutdown(err => (err ? reject(err) : resolve())));
const tryShutdown = (server) => new Promise((resolve, reject) => server.tryShutdown(err => (err ? reject(err) : resolve())));
exports.tryShutdown = tryShutdown;
/** Promise wrapper for callback bindAsync */
exports.bindAsync = (server, address, creds) => new Promise((resolve, reject) => server.bindAsync(address, creds, (err, port) => err ? reject(err) : resolve(port)));
exports.path2Fragments = (path) => {
const bindAsync = (server, address, creds) => new Promise((resolve, reject) => server.bindAsync(address, creds, (err, port) => err ? reject(err) : resolve(port)));
exports.bindAsync = bindAsync;
const path2Fragments = (path) => {
var _a;

@@ -19,2 +21,3 @@ const [, ps, m] = path.split('/');

};
exports.path2Fragments = path2Fragments;
//# sourceMappingURL=grpc-helpers.js.map

@@ -38,4 +38,4 @@ import * as grpc from '@grpc/grpc-js';

*/
stop(): Promise<unknown>;
stop(): Promise<void>;
}
//# sourceMappingURL=application.d.ts.map

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

const call_types_1 = require("../../call-types");
exports.createCache = (
const createCache = (
/** Response binary cache implementation */

@@ -30,2 +30,3 @@ cache,

};
exports.createCache = createCache;
//# sourceMappingURL=cache.js.map

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

*/
exports.composeMiddleware = (middleware) => {
const composeMiddleware = (middleware) => {
return async (call, next) => {

@@ -21,2 +21,3 @@ const dispatch = async (i) => {

};
exports.composeMiddleware = composeMiddleware;
//# sourceMappingURL=compose-middleware.js.map

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

const merged = Symbol('protocat.merged');
exports.addMeta = (e, call) => {
const addMeta = (e, call) => {
var _a;

@@ -21,2 +21,3 @@ if (e[merged])

};
exports.addMeta = addMeta;
/**

@@ -66,3 +67,3 @@ * Patches emit function to intercept errors with a handler to be able to consume or map dispatched errors on stream, before existing listeners are invoked.

*/
exports.onError = (handler) => async (call, next) => {
const onError = (handler) => async (call, next) => {
if (call.type === call_types_1.CallType.ServerStream ||

@@ -80,2 +81,3 @@ call.type === call_types_1.CallType.Bidi ||

};
exports.onError = onError;
//# sourceMappingURL=on-error.js.map

@@ -10,2 +10,4 @@ // source: type/cat.proto

// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

@@ -12,0 +14,0 @@ var jspb = require('google-protobuf');

@@ -58,3 +58,3 @@ // package: cats.v1

export interface ICatServer {
export interface ICatServer extends grpc.UntypedServiceImplementation {
getCat: grpc.handleUnaryCall<v1_cat_pb.GetCatRequest, type_cat_pb.Cat>;

@@ -61,0 +61,0 @@ watchCats: grpc.handleServerStreamingCall<v1_cat_pb.WatchCatsRequest, type_cat_pb.Cat>;

@@ -10,2 +10,4 @@ // source: v1/cat.proto

// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

@@ -12,0 +14,0 @@ var jspb = require('google-protobuf');

@@ -57,3 +57,3 @@ // package: cats.v1

export interface IGreetingServer {
export interface IGreetingServer extends grpc.UntypedServiceImplementation {
unary: grpc.handleUnaryCall<v1_hello_pb.Hello, v1_hello_pb.Hello>;

@@ -60,0 +60,0 @@ serverStream: grpc.handleServerStreamingCall<v1_hello_pb.Hello, v1_hello_pb.Hello>;

@@ -10,2 +10,4 @@ // source: v1/hello.proto

// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck

@@ -12,0 +14,0 @@ var jspb = require('google-protobuf');

{
"name": "protocat",
"description": "Modern, minimalist type-safe gRPC framework for Node.js",
"version": "0.6.0",
"version": "0.6.1",
"author": "Jaroslav Šmolík <grissius@gmail.com>",

@@ -42,4 +42,4 @@ "main": "./dist/index.js",

"dependencies": {
"@grpc/grpc-js": "1.1.7",
"@types/google-protobuf": "^3.7.3"
"@grpc/grpc-js": "1.2.2",
"@types/google-protobuf": "^3.7.4"
},

@@ -61,4 +61,4 @@ "devDependencies": {

"typedoc-plugin-markdown": "^3.0.11",
"typescript": "^4.0.3"
"typescript": "^4.1.3"
}
}

@@ -9,3 +9,3 @@ <div align="center">

[![](https://flat.badgen.net/travis/grissius/protocat)](https://travis-ci.com/github/grissius/protocat)
[![](https://flat.badgen.net/travis/grissius/protocat/master)](https://travis-ci.com/github/grissius/protocat)
[![](https://flat.badgen.net/npm/v/protocat)](https://www.npmjs.com/package/protocat)

@@ -16,3 +16,3 @@ [![](https://flat.badgen.net/codecov/c/github/grissius/protocat)](https://codecov.io/gh/grissius/protocat)

[![](https://flat.badgen.net/david/dep/grissius/protocat)](https://david-dm.org/grissius/protocat)
[![](https://flat.badgen.net/snyk/grissius/protocat)](https://snyk.io/vuln/npm:protocat)
[![](https://flat.badgen.net/snyk/grissius/protocat/master)](https://snyk.io/vuln/npm:protocat)
[![](https://flat.badgen.net/badge/%F0%9F%93%91%20docs/pages/cyan)](https://proto.cat)

@@ -19,0 +19,0 @@

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

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

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc