Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@aws-sdk/eventstream-serde-config-resolver
Advanced tools
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/eventstream-serde-config-resolver/latest.svg)](https://www.npmjs.com/package/@aws-sdk/eventstream-serde-config-resolver) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/eventstream-serde-confi
@aws-sdk/eventstream-serde-config-resolver is a package within the AWS SDK for JavaScript that provides utilities for resolving configuration related to event stream serialization and deserialization. This is particularly useful when working with AWS services that use event streams, such as AWS Transcribe or Kinesis.
Event Stream Serialization
This feature allows you to resolve the configuration for event stream serialization. The `resolveEventStreamSerdeConfig` function takes an object with an `eventStreamSerdeProvider` property, which provides the serialization and deserialization logic.
const { resolveEventStreamSerdeConfig } = require('@aws-sdk/eventstream-serde-config-resolver');
const config = resolveEventStreamSerdeConfig({
eventStreamSerdeProvider: () => ({
serialize: (input) => {/* serialization logic */},
deserialize: (output) => {/* deserialization logic */}
})
});
console.log(config);
Custom Serialization Logic
This feature demonstrates how to provide custom serialization and deserialization logic. The `customSerdeProvider` object defines how to serialize and deserialize event stream data, and this is passed to the `resolveEventStreamSerdeConfig` function.
const { resolveEventStreamSerdeConfig } = require('@aws-sdk/eventstream-serde-config-resolver');
const customSerdeProvider = {
serialize: (input) => Buffer.from(JSON.stringify(input)),
deserialize: (output) => JSON.parse(output.toString())
};
const config = resolveEventStreamSerdeConfig({
eventStreamSerdeProvider: () => customSerdeProvider
});
console.log(config);
The `aws-sdk` package is the official AWS SDK for JavaScript. It provides a comprehensive set of tools for interacting with AWS services, including event stream handling. However, it is a much larger package and includes a wide range of functionalities beyond just event stream serialization and deserialization.
The `kinesis-client-library` package is designed specifically for working with Amazon Kinesis streams. It includes utilities for processing and managing Kinesis data streams, including serialization and deserialization of event streams. It is more specialized compared to `@aws-sdk/eventstream-serde-config-resolver`.
The `aws-sdk-client-mock` package is used for mocking AWS SDK clients in unit tests. While it does not directly provide event stream serialization and deserialization, it can be used to mock the behavior of AWS services that use event streams, making it useful for testing purposes.
An internal package
You probably shouldn't, at least directly.
3.347.0 (2023-06-06)
FAQs
[![NPM version](https://img.shields.io/npm/v/@aws-sdk/eventstream-serde-config-resolver/latest.svg)](https://www.npmjs.com/package/@aws-sdk/eventstream-serde-config-resolver) [![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/eventstream-serde-confi
The npm package @aws-sdk/eventstream-serde-config-resolver receives a total of 781,639 weekly downloads. As such, @aws-sdk/eventstream-serde-config-resolver popularity was classified as popular.
We found that @aws-sdk/eventstream-serde-config-resolver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.