🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@rocketseat/kafka-typings

Package Overview
Dependencies
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rocketseat/kafka-typings

This package exports typings for Kafka topics and messages so we can keep a pattern of the data exchanged between the micro-services.

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
4
Created
Source

Kafka Typings

This package exports typings for Kafka topics and messages so we can keep a pattern of the data exchanged between the micro-services.

Usage example

import * as PlutoKafka from '@rocketseat/kafka-typings/types/pluto';
import { kafka } from 'example-kafka-client-path';

const message: PlutoKafka.SignatureCreatedMessage = {
  // this will be typed
}

kafka.emit(PlutoKafka.TOPICS.SIGNATURE_CREATED, message);

Using locally

To use this package locally, we will use yalc that works like a local store for NPM packages.

First, install yalc globally using NPM or Yarn.

yarn global add yalc
npm i yalc -g

Publish package to local store

Inside the kafka-typings folder, after changing it's code, you can:

yalc publish

This will publish the package to the local store.

Use the package inside another project

Inside the project folder, run:

yalc link @rocketseat/kafka-typings

Update the package code

You can always refresh the package code using yalc update, this will bring the latest version of the code from within the local store (this will only works after a yalc publish).

Keep it out of Git

Always remember to include yalc.lock and .yalc folder inside the .gitignore file on the project folder.

FAQs

Package last updated on 10 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts