Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable nodejs in js processor #1094

Merged
merged 4 commits into from
Jul 6, 2023
Merged

Enable nodejs in js processor #1094

merged 4 commits into from
Jul 6, 2023

Conversation

lovromazgon
Copy link
Member

@lovromazgon lovromazgon commented Jun 30, 2023

Description

This adds support for goja_nodejs in the JavaScript processor. This enables us to use utilities like the buffer to manipulate raw data. For example, I used it in a pipeline to encode raw data as base64:

const Buffer = require("node:buffer").Buffer;

function process(record) {
    record.Payload.After.Raw = Buffer.from(record.Payload.After.Raw).toString("base64");
    return record;
}

Quick checks:

  • I have followed the Code Guidelines.
  • There is no other pull request for the same update/change.
  • I have written unit tests. (if I get the time I'll add some later, did manually test though)
  • I have made sure that the PR is of reasonable size and can be easily reviewed.

@lovromazgon lovromazgon requested a review from a team as a code owner June 30, 2023 16:06
Copy link
Member

@simonl2002 simonl2002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@lovromazgon lovromazgon merged commit b86eb01 into main Jul 6, 2023
3 checks passed
@lovromazgon lovromazgon deleted the lovro/goja-nodejs branch July 6, 2023 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants