
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@syntropylog/adapters
Advanced tools
External adapters for SyntropyLog framework - Brokers, HTTP clients, and Database Serializers.
🚀 Version 0.1.24 - Refactored & Tested Adapters 🚀
@syntropylog/adapters core adapters are production ready with field-tested implementations.
What we have (verified working):
- ✅ Brokers: Kafka, NATS, RabbitMQ - All working in production examples
- ✅ HTTP Clients: Axios, Fetch - Both working and tested
- ✅ Integration: All adapters work seamlessly with SyntropyLog framework
What we're working on:
- 🚧 Database Serializers: MongoDB, MySQL, Oracle, etc. - Coming soon
- 🚧 Advanced Examples: NestJS, GraphQL integrations - In development
Latest fixes:
- ✅ Cleaned dependencies: Removed unused
got
dependency (now usingaxios
andfetch
)- ✅ Added comprehensive test coverage: Created tests for NatsAdapter and RabbitMQAdapter
- ✅ Refactored all broker adapters: Extracted common serialization logic into
PayloadSerializer
utility- ✅ KafkaAdapter: Fixed buffer serialization issue - payloads now display as readable JSON instead of Buffer objects
- ✅ NatsAdapter: Fixed buffer serialization issue - payloads now display as readable JSON instead of Buffer objects
- ✅ NatsAdapter: Improved JSON codec handling with intelligent serialization/deserialization
- ✅ NatsAdapter: Fixed headers iteration and added proper subscription cleanup
- ✅ RabbitMQAdapter: Fixed buffer serialization issue - payloads now display as readable JSON instead of Buffer objects
- ✅ RabbitMQAdapter: Fixed exchange durability and consumer cancellation issues
- ✅ Improved stability: Proper cleanup prevents hanging processes
npm install @syntropylog/adapters
import {
KafkaAdapter,
PrismaSerializer,
AxiosAdapter
} from '@syntropylog/adapters';
import { KafkaAdapter, NatsAdapter, RabbitMQAdapter } from '@syntropylog/adapters/brokers';
import { AxiosAdapter, FetchAdapter } from '@syntropylog/adapters/http';
// Coming soon - Database serializers are in development
// import {
// PrismaSerializer,
// TypeORMSerializer,
// MySQLSerializer,
// PostgreSQLSerializer,
// SQLServerSerializer,
// OracleSerializer,
// MongoDBSerializer
// } from '@syntropylog/adapters/serializers';
import type { ISerializer, SerializationContext, SerializationResult } from '@syntropylog/adapters/types';
import { KafkaAdapter } from '@syntropylog/adapters/brokers';
const kafkaAdapter = new KafkaAdapter({
clientId: 'my-app',
brokers: ['localhost:9092']
});
await kafkaAdapter.connect();
await kafkaAdapter.publish('my-topic', { message: 'Hello World' });
import { AxiosAdapter } from '@syntropylog/adapters/http';
import axios from 'axios';
const axiosAdapter = new AxiosAdapter(axios);
const response = await axiosAdapter.request({
url: 'https://api.example.com/users',
method: 'GET'
});
import { PrismaSerializer } from '@syntropylog/adapters/serializers';
const prismaSerializer = new PrismaSerializer();
const result = await prismaSerializer.serialize(prismaQuery, {
sanitize: true,
sensitiveFields: ['password', 'token']
});
import { registerAllSerializers } from '@syntropylog/adapters/serializers';
// Register all serializers with a manager
registerAllSerializers(serializationManager);
import { getAllSerializers } from '@syntropylog/adapters/serializers';
const allSerializers = getAllSerializers();
// Returns array of all serializer instances
All serializers are optimized for ultra-fast object translation:
import { PrismaSerializer } from '@syntropylog/adapters/serializers';
const serializer = new PrismaSerializer();
const result = await serializer.serialize(prismaQuery, {
timeout: 100, // Custom timeout
sanitize: true,
sensitiveFields: ['password']
});
# Run all tests
npm test
# Run tests with coverage
npm run test:coverage
# Run specific test categories
npm test -- tests/serializers/
npm test -- tests/brokers/
npm test -- tests/http/
Current test coverage: 60.48%
@syntropylog/types
^0.1.5axios
^1.10.0kafkajs
^2.2.4nats
^2.17.0amqplib
^0.10.8Each adapter focuses on a single responsibility:
Timeouts are managed by the main SyntropyLog framework, not by individual adapters:
// ✅ Correct: Timeout from context
const result = await serializer.serialize(data, { timeout: 100 });
// ❌ Wrong: No hardcoded timeouts in adapters
// All adapters respect the timeout from SerializationContext
Apache-2.0 - see LICENSE file for details.
We believe in complete transparency about what we have and what we're building:
What we have (verified working):
What we're working on:
Why no complex unit tests for some adapters? We focus on field testing and integration tests rather than complex mocks that don't reflect real-world usage. Our examples (00-22) serve as comprehensive integration tests.
See CONTRIBUTING.md for contribution guidelines.
FAQs
External adapters for SyntropyLog framework
We found that @syntropylog/adapters demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.