New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@soundxyz/redis-pubsub

Package Overview
Dependencies
Maintainers
9
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@soundxyz/redis-pubsub - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

6

dist/index.d.ts

@@ -14,2 +14,6 @@ import type { Redis } from "ioredis";

onParseError?: (err: unknown) => void;
/**
* Customize or disable the specified event codes messages
*/
customizeEventCodes?: Partial<Record<EventCodes, string | boolean | null>>;
}

@@ -33,3 +37,3 @@ export declare const EventCodes: {

export declare type EventCodes = typeof EventCodes[keyof typeof EventCodes];
export declare function RedisPubSub({ publisher, subscriber, logger, logLevel, onParseError, }: RedisPubSubOptions): {
export declare function RedisPubSub({ publisher, subscriber, logger, logLevel, onParseError, customizeEventCodes, }: RedisPubSubOptions): {
createChannel: <Input, Output>({ name, isLazy, ...schemas }: {

@@ -36,0 +40,0 @@ name: string;

@@ -8,5 +8,18 @@ 'use strict';

var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __objRest = (source, exclude) => {

@@ -45,5 +58,7 @@ var target = {};

logLevel = "silent",
onParseError = logger.error
onParseError = logger.error,
customizeEventCodes
}) {
const intLogLevel = logLevel === "silent" ? 0 : logLevel === "info" ? 1 : 2;
const customizedEventCodes = __spreadValues(__spreadValues({}, EventCodes), customizeEventCodes);
const subscriptionsMap = {};

@@ -62,5 +77,10 @@ subscriber.on("message", onMessage);

const start = performance.now();
return () => `${performance.now() - start}ms`;
return () => `${(performance.now() - start).toFixed()}ms`;
}
function logMessage(code, paramsObject) {
let codeValue = customizedEventCodes[code];
if (!codeValue)
return;
if (typeof codeValue !== "string")
codeValue = EventCodes[code];
let params = "";

@@ -240,3 +260,4 @@ for (const key in paramsObject) {

logMessage("SUBSCRIPTION_ABORTED", {
channel
channel,
subscribers: dataPromises.size
});

@@ -243,0 +264,0 @@ }

2

package.json
{
"name": "@soundxyz/redis-pubsub",
"version": "2.1.0",
"version": "2.2.0",
"description": "Full type-safe Redis PubSub with Zod",

@@ -5,0 +5,0 @@ "keywords": [

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