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

@ovotech/castle

Package Overview
Dependencies
Maintainers
104
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ovotech/castle - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

31

dist/middlewares/logging.js

@@ -9,24 +9,21 @@ "use strict";

if (exports.isBatch(ctx)) {
const offsetFirst = ctx.batch.firstOffset();
const offsetLast = ctx.batch.lastOffset();
const offsetLag = ctx.batch.offsetLag();
const messages = ctx.batch.messages.length;
const partition = ctx.batch.partition;
const topic = ctx.batch.topic;
return [
`Consume ${ctx.batch.topic}`,
{
topic: ctx.batch.topic,
messages: ctx.batch.messages.length,
partition: ctx.batch.partition,
lag: ctx.batch.offsetLag(),
offsetFirst: ctx.batch.firstOffset(),
offsetLast: ctx.batch.lastOffset(),
offsetLag: ctx.batch.offsetLag(),
},
`Batch ${topic}[${partition}] msgs: ${messages}, offsets: ${offsetFirst}...${offsetLast}, lag: ${offsetLag}`,
{ topic, messages, partition, offsetFirst, offsetLast, offsetLag },
];
}
else if (exports.isMessage(ctx)) {
const offset = ctx.message.offset;
const key = ctx.message.key;
const partition = ctx.partition;
const topic = ctx.topic;
return [
`Consume ${ctx.topic}`,
{
topic: ctx.topic,
offset: ctx.message.offset,
key: ctx.message.key,
partition: ctx.partition,
},
`Message ${topic}[${partition}] offset: ${offset}, key: ${key}`,
{ topic, offset, key, partition },
];

@@ -33,0 +30,0 @@ }

{
"name": "@ovotech/castle",
"version": "0.2.0",
"version": "0.2.1",
"main": "dist/index.js",

@@ -45,3 +45,3 @@ "types": "dist/index.d.ts",

},
"gitHead": "1d43fe50bde26954e6ec94428422d183cd8ed173"
"gitHead": "30ed3c31f8850d4d14269cf3a11c71f051630732"
}
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