Socket
Socket
Sign inDemoInstall

protocat

Package Overview
Dependencies
118
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.0-beta.0 to 0.5.0-beta.1

1

dist/index.d.ts
export { ProtoCat } from './lib/server/application';
export { CallType } from './lib/call-types';
export { onError } from './lib/server/middleware/on-error';
export { CacheImplementation, createCache } from './lib/server/middleware/cache';
export { Middleware, ServiceImplementation } from './lib/server/call';

@@ -5,0 +6,0 @@ export { createClient } from './lib/client/client';

@@ -9,2 +9,4 @@ "use strict";

Object.defineProperty(exports, "onError", { enumerable: true, get: function () { return on_error_1.onError; } });
var cache_1 = require("./lib/server/middleware/cache");
Object.defineProperty(exports, "createCache", { enumerable: true, get: function () { return cache_1.createCache; } });
var client_1 = require("./lib/client/client");

@@ -11,0 +13,0 @@ Object.defineProperty(exports, "createClient", { enumerable: true, get: function () { return client_1.createClient; } });

4

dist/lib/server/middleware/cache.d.ts

@@ -6,4 +6,4 @@ /// <reference types="node" />

export interface CacheImplementation<E = {}> {
hash: (call: ProtoCatCall<E, Message, Message, CallType.Unary>) => Promise<string> | string;
get: (key: string) => Promise<Buffer | undefined> | Buffer | undefined;
hash: (call: ProtoCatCall<E, Message, Message, CallType.Unary>) => Promise<string | undefined> | string | undefined;
get: (key: string, call: ProtoCatCall<E, Message, Message, CallType.Unary>) => Promise<Buffer | undefined> | Buffer | undefined;
set: (key: string, value: Buffer, call: ProtoCatCall<E, Message, Message, CallType.Unary>) => void;

@@ -10,0 +10,0 @@ }

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

return next();
let cached = await cache.get(key);
let cached = await cache.get(key, call);
if (!cached) {

@@ -14,0 +14,0 @@ // cache miss

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

@@ -6,0 +6,0 @@ "main": "./dist/index.js",

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