
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@raystack/raccoon
Advanced tools
A JS client library for Raccoon, compatible both in browsers as well as nodejs environment.
Features:
Note: For encoding protobuf messages, this client utilises protobufjs.
npm i @raystack/raccoon --save
For example:
import { RaccoonClient, SerializationType, WireType } from '@raystack/raccoon';
const raccoonClient = new RaccoonClient({
serializationType: SerializationType.PROTOBUF,
wireType: WireType.JSON,
timeout: 5000,
url: 'http://localhost:8080/api/v1/events',
headers: {
'X-User-ID': 'user-1'
}
});
In the below example, we are sending protobuf messages.
Note: In this case, we only need to send the protobufjs object along with values, the client will take care of encoding the object.
const pageEvent = new clickevents.PageEvent();
pageEvent.eventGuid = "123";
pageEvent.eventName = "page open";
const clickEvent = new clickevents.ClickEvent();
clickEvent.eventGuid = "123";
clickEvent.componentIndex = 1;
clickEvent.componentName = "images";
const events = [
{
type: 'test-topic1',
data: clickEvent
},
{
type: 'test-topic2',
data: pageEvent
}
];
raccoonClient.send(events)
.then(result => {
console.log('Result:', result);
})
.catch(error => {
console.error('Error:', error);
});
Note: Here, the PageEvent and ClickEvent are imported from generated protobufjs code.
See complete examples for sending JSON and protobuf messages: examples
SerializationTypeThe serialization type to use for the events being sent to Kafka, either 'PROTOBUF' or 'JSON'.
RequiredSerializationType.JSONWireTypeThe wire configuration using which the request payload should be sent to raccoon server
RequiredWireType.JSONurlThe URL for the raccoon server.
Requiredhttp://localhost:8080/api/v1/eventsheadersCustom headers to be included in the HTTP requests.
Optional{}timeoutThe request timeout in milliseconds.
Optional1000retryMaxThe maximum number of retry attempts for failed requests.
Optional3retryWaitThe time in milliseconds to wait between retry attempts.
Optional5000loggerLogger object for logging.
OptionalconsoleClone the repo
$ git clone https://github.com/raystack/raccoon
$ cd raccoon/clients/js
Install dependencies
$ npm install
Run the tests. All of the tests are written with jest.
$ npm test
Run format.
$ npm run format
Run lint.
$ npm run lint
We use SemVer for versioning. For the versions available, see the tags.
FAQs
Raccoon js client publishes events to raccoon server
We found that @raystack/raccoon demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.